equal
deleted
inserted
replaced
225 close $fh; |
225 close $fh; |
226 } |
226 } |
227 |
227 |
228 # Reletive file from the perspect of file1, to file2 |
228 # Reletive file from the perspect of file1, to file2 |
229 sub prel_path ($from, $to) { |
229 sub prel_path ($from, $to) { |
230 return $to if $from eq $to; |
230 return $to =~ s!^/!!r if $from eq $to; |
231 my \(@f1, @f2) = map [m{/[^/]+}g], ($from, $to); |
231 my \(@f1, @f2) = map [m{/[^/]+}g], ($from, $to); |
232 # return substr($f1[$#f1], 1) if $from =~ $to; |
232 # return substr($f1[$#f1], 1) if $from =~ $to; |
233 while (@f1 && @f2 && $f1[0] =~ $f2[0]) { |
233 while (@f1 && @f2 && $f1[0] =~ $f2[0]) { |
234 shift @f1; |
234 shift @f1; |
235 shift @f2; |
235 shift @f2; |