aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-02-20 22:19:28 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-02-20 22:19:28 +0000
commit135e5fc63a47d198e6ab6b0ebf30c87087d3f5d5 (patch)
treeff9bf6f7e4eaebb3b0399cd452e5e72a178a11c3 /IkiWiki.pm
parent1334cc55ba522855bf5c7cd24febd70c6ac6fc23 (diff)
downloadikiwiki-135e5fc63a47d198e6ab6b0ebf30c87087d3f5d5.tar
ikiwiki-135e5fc63a47d198e6ab6b0ebf30c87087d3f5d5.tar.gz
* perl is broken: print "" || die fails! Work around this insanity.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index bbc857214..40622a5be 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -292,7 +292,9 @@ sub writefile ($$$;$$) { #{{{
$writer->(\*OUT, $cleanup);
}
else {
- print OUT $content || error("failed writing to $newfile: $!", $cleanup);
+ if (length $content) {
+ print OUT $content || error("failed writing to $newfile: $!", $cleanup);
+ }
}
close OUT || error("failed saving $newfile: $!", $cleanup);
rename($newfile, "$destdir/$file") ||