Make srcfile() return undef, if the file isn't there.
This has the advantage that it's now possible to check for the existence of a sourcefile with that function.master
parent
deb0bc8bd5
commit
4af4d26582
|
@ -743,7 +743,10 @@ sub srcfile_stat {
|
|||
}
|
||||
|
||||
sub srcfile ($;$) {
|
||||
return (srcfile_stat(@_))[0];
|
||||
if (my @stat=srcfile_stat(@_)) {
|
||||
return $stat[0];
|
||||
}
|
||||
return undef
|
||||
}
|
||||
|
||||
sub add_underlay ($) {
|
||||
|
|
Loading…
Reference in New Issue