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
David Riebenbauer 2010-01-30 10:25:10 +01:00
parent deb0bc8bd5
commit 4af4d26582
1 changed files with 4 additions and 1 deletions

View File

@ -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 ($) {