tools/fshu.pm
changeset 21 7b569e2061c7
parent 3 859da167ccfe
child 106 e7feb3e56cd0
equal deleted inserted replaced
20:75412e452636 21:7b569e2061c7
    92       }
    92       }
    93     }
    93     }
    94   }
    94   }
    95   $path = join('\\', @collapsedPath);
    95   $path = join('\\', @collapsedPath);
    96 
    96 
       
    97   if ($path =~ m|^\\epoc32|) {
       
    98     # If it starts with \epoc32, chop the leading backslash and stick on $EPOCROOT
       
    99     $path =~ s|^\\|$ENV{EPOCROOT}|;
       
   100   }
       
   101 
    97   return $path;
   102   return $path;
    98 }
   103 }
    99 
   104 
   100 sub MakePath ($) {
   105 sub MakePath ($) {
   101   my $dir = shift;
   106   my $dir = shift;
   122     }
   127     }
   123     else {
   128     else {
   124       mkpath($dir) or die "Couldn't make path \"$dir\": $!\n";
   129       mkpath($dir) or die "Couldn't make path \"$dir\": $!\n";
   125     }
   130     }
   126   }
   131   }
   127   if ($dir =~ /^\\epoc32/) {
   132   if ($dir =~ m|^\\epoc32|) {
   128     # If it starts with \epoc32, chop the leading backslash and stick on $EPOCROOT
   133     # If it starts with \epoc32, chop the leading backslash and stick on $EPOCROOT
   129     $dir =~ s/^\\/$ENV{EPOCROOT}/;
   134     $dir =~ s|^\\|$ENV{EPOCROOT}|;
   130   }
   135   }
   131 }
   136 }
   132 
   137 
   133 sub CopyFile {
   138 sub CopyFile {
   134   my $from = TidyPath(shift);
   139   my $from = TidyPath(shift);