X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/cb8d1c86425999eb3572326679fae9a033664150..aab415481de28a7ca3baa7e7d5ba168e962f61e0:/IkiWiki/Plugin/teximg.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/teximg.pm b/IkiWiki/Plugin/teximg.pm index 0753a9a77..8c3e88c69 100644 --- a/IkiWiki/Plugin/teximg.pm +++ b/IkiWiki/Plugin/teximg.pm @@ -76,7 +76,7 @@ sub create ($$$) { #{{{ will_render($params->{page}, $imglog); my $imgurl=urlto($imglink, $params->{destpage}); - my $logurl=urlto($imglink, $params->{destpage}); + my $logurl=urlto($imglog, $params->{destpage}); if (-e "$config{destdir}/$imglink" || gen_image($code, $height, $digest, $params->{page})) { @@ -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);