Browse Source

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

master
freesource 23 years ago
parent
commit
c3d1b82e40
  1. 14
      BootRoot/Yard.pm

14
BootRoot/Yard.pm

@ -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);
## Absolute Replacements are all right --freesource
if ( !(defined($abs_replacement) and -e $abs_replacement) ) { if ( !(defined($abs_replacement) and -e $abs_replacement) ) {
cf_warn($contents_file, $line, "Can't find $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

Loading…
Cancel
Save