1
0
mirror of https://github.com/fspc/gbootroot.git synced 2025-02-23 09:03:23 -05:00

If a replacement is found to be a file in an absolute location it is used.

This commit is contained in:
freesource 2001-11-29 19:35:31 +00:00
parent 8223d83b88
commit c3d1b82e40

View File

@ -394,8 +394,20 @@ sub read_contents_file {
"left-hand side can't be directory"); "left-hand side can't be directory");
# my($abs_replacement) = find_file_in_path($replacement,$main::global_yard); # my($abs_replacement) = find_file_in_path($replacement,$main::global_yard);
my($abs_replacement) = find_file_in_path($replacement); my($abs_replacement) = find_file_in_path($replacement);
if (!(defined($abs_replacement) and -e $abs_replacement)) {
cf_warn($contents_file, $line, "Can't find $replacement"); ## Absolute Replacements are all right --freesource
if ( !(defined($abs_replacement) and -e $abs_replacement) ) {
if ( !-f $replacement ) {
cf_warn($contents_file, $line,
"Can't find $replacement");
}
else {
info(0, "Using Replacement $replacement because it was" .
"found in an absolute location\n");
$abs_replacement = $replacement;
$replaced_by{$file} = $abs_replacement;
$Included{$file} = 1;
}
} elsif ($replacement =~ m|^/dev/(?!null)|) { } elsif ($replacement =~ m|^/dev/(?!null)|) {
# Allow /dev/null but no other devices # Allow /dev/null but no other devices