projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
deb0bc8
)
Make srcfile() return undef, if the file isn't there.
author
David Riebenbauer
<davrieb@liegesta.at>
Sat, 30 Jan 2010 09:25:10 +0000
(10:25 +0100)
committer
David Riebenbauer
<davrieb@liegesta.at>
Tue, 2 Feb 2010 13:04:28 +0000
(14:04 +0100)
This has the advantage that it's now possible to check for the existence of a
sourcefile with that function.
IkiWiki.pm
patch
|
blob
|
history
diff --git
a/IkiWiki.pm
b/IkiWiki.pm
index b8e599928678d31ab918cb629da94d95a35b7b1e..cb1c46a68c76d51f52730372c370ea22ee8dc97b 100644
(file)
--- a/
IkiWiki.pm
+++ b/
IkiWiki.pm
@@
-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 ($) {