Browse Source

This takes care of a problem when links were specified which didn't actually exist, or

had no / appended .. basically dirname turned into "." which created a directory
apart from the loopback dir.  Fixed in make_link_absolute.
master
freesource 23 years ago
parent
commit
c7f6af4af5
  1. 9
      BootRoot/Yard.pm

9
BootRoot/Yard.pm

@ -1721,11 +1721,18 @@ sub find_file_in_path {
sub make_link_absolute {
my($file, $target) = @_;
my $link;
if ($target =~ m|^/|) {
$target; # Target is absolute, just return it
} else {
cleanup_link(dirname($file) . "/$target");
$link =cleanup_link(dirname($file) . "/$target");
}
$link =~ s,^\.,,; # When there is one file dir eq . --freesource
return $link;
}

Loading…
Cancel
Save