]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/teximg.pm
Merge branch 'master'
[git.ikiwiki.info.git] / IkiWiki / Plugin / teximg.pm
index 29c1057f300d2580049218d59a876dfca526eccf..8c3e88c6974a8f2d5aa00fc119ba1f8941f4c943 100644 (file)
@@ -119,12 +119,13 @@ sub gen_image ($$$$) { #{{{
        }
        else {
                # store failure log
        }
        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);
 
                }
                writefile("$digest.log", "$config{destdir}/$imagedir", $log);