tools/fshu.pm
changeset 21 7b569e2061c7
parent 3 859da167ccfe
--- a/tools/fshu.pm	Thu Jul 29 19:16:52 2010 +0100
+++ b/tools/fshu.pm	Fri Jul 30 14:53:31 2010 +0100
@@ -94,6 +94,11 @@
   }
   $path = join('\\', @collapsedPath);
 
+  if ($path =~ m|^\\epoc32|) {
+    # If it starts with \epoc32, chop the leading backslash and stick on $EPOCROOT
+    $path =~ s|^\\|$ENV{EPOCROOT}|;
+  }
+
   return $path;
 }
 
@@ -124,9 +129,9 @@
       mkpath($dir) or die "Couldn't make path \"$dir\": $!\n";
     }
   }
-  if ($dir =~ /^\\epoc32/) {
+  if ($dir =~ m|^\\epoc32|) {
     # If it starts with \epoc32, chop the leading backslash and stick on $EPOCROOT
-    $dir =~ s/^\\/$ENV{EPOCROOT}/;
+    $dir =~ s|^\\|$ENV{EPOCROOT}|;
   }
 }