genorg.pl
changeset 15 c8e6e4e514f3
parent 14 31e45dd2a894
child 16 be331e8c8caf
--- a/genorg.pl	Wed Dec 18 02:18:43 2024 +1000
+++ b/genorg.pl	Wed Dec 18 14:42:38 2024 +1000
@@ -227,7 +227,7 @@
 
 # Reletive file from the perspect of file1, to file2
 sub prel_path ($from, $to) {
-  return $to if $from eq $to;
+  return $to =~ s!^/!!r if $from eq $to;
   my \(@f1, @f2) = map [m{/[^/]+}g], ($from, $to);
   # return substr($f1[$#f1], 1) if $from =~ $to;
   while (@f1 && @f2 && $f1[0] =~ $f2[0]) {