]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
locking bug
[ikiwiki.git] / IkiWiki.pm
index bbc857214a361fff020063165a17af79c421362b..40622a5beacdbd2844d7a09f1584436f2b7064bf 100644 (file)
@@ -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") ||