summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/teximg.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin/teximg.pm')
-rw-r--r--IkiWiki/Plugin/teximg.pm13
1 files changed, 7 insertions, 6 deletions
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);