summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-05-29 19:29:40 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-05-29 19:29:40 -0400
commit9d93029f010c5eaa73ecbce8eb887d9132b7311a (patch)
treeea7be6d4d785ffa7ef26c1bcc404bff89a8138ad /IkiWiki/Plugin
parentb0a7b2f3d7e62d35668a42dab2256505e68515f1 (diff)
teximg: If the log isn't written, avoid ugly error messages.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/teximg.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/teximg.pm b/IkiWiki/Plugin/teximg.pm
index 29c1057f3..8c3e88c69 100644
--- a/IkiWiki/Plugin/teximg.pm
+++ b/IkiWiki/Plugin/teximg.pm
@@ -119,12 +119,13 @@ sub gen_image ($$$$) { #{{{
}
else {
# store failure log
- my $log;
+ my $log="";
{
- open(my $f, '<', "$tmp/$digest.log");
- local $/=undef;
- $log = <$f>;
- close($f);
+ if (open(my $f, '<', "$tmp/$digest.log")) {
+ local $/=undef;
+ $log = <$f>;
+ close($f);
+ }
}
writefile("$digest.log", "$config{destdir}/$imagedir", $log);