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:
parent
8223d83b88
commit
c3d1b82e40
@ -394,8 +394,20 @@ sub read_contents_file {
|
||||
"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);
|
||||
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)|) {
|
||||
# Allow /dev/null but no other devices
|
||||
|
Loading…
x
Reference in New Issue
Block a user