mirror of
https://github.com/fspc/gbootroot.git
synced 2025-02-23 09:03:23 -05:00
Path is now updated properly, only adding a new path if it doesn't already
exist.
This commit is contained in:
parent
38aaef1e04
commit
849725cb71
@ -1526,10 +1526,21 @@ sub find_file_in_path {
|
||||
## if (!@pathlist) {
|
||||
@pathlist = split(':', $ENV{'PATH'});
|
||||
if (defined(@::additional_dirs)) {
|
||||
unshift(@pathlist, @::additional_dirs);
|
||||
|
||||
foreach my $alt_path ( @main::additional_dirs ) {
|
||||
|
||||
my $add_path = grep(/$alt_path/,$ENV{'PATH'});
|
||||
if ($add_path == 0) {
|
||||
unshift(@pathlist, $alt_path );
|
||||
$ENV{'PATH'} = "$alt_path:" . $ENV{'PATH'};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
## unshift(@pathlist, @::additional_dirs);
|
||||
### Changed this to work as documented
|
||||
$ENV{"PATH"} = join(":", @::additional_dirs) .
|
||||
":$ENV{'PATH'}";
|
||||
## $ENV{"PATH"} = join(":", @::additional_dirs) . ":$ENV{'PATH'}";
|
||||
|
||||
}
|
||||
##info(1, "Using search path:\n", join(" ", @pathlist), "\n");
|
||||
## }
|
||||
@ -1592,11 +1603,11 @@ sub make_link_relative {
|
||||
# The abs_file guaranteed not to have any funny
|
||||
# stuff like "/./" or "/foo/../../bar" already in it.
|
||||
|
||||
## This is an experimental solution to an annoying tendency
|
||||
## This is a solution to an annoying tendency
|
||||
## for this to happen ../../../../ for files/dirs .. basically
|
||||
## this occurs when called from include_file() called from
|
||||
## extra_links() .. the reason for relativing links like this
|
||||
## doesn't make sense.
|
||||
## doesn't make sense. --freesource
|
||||
if (!-f $link && !-d $link) {
|
||||
$newlink = ("../" x path_length($abs_file)) . $1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user