From: Joey Hess Date: Thu, 29 May 2008 23:29:40 +0000 (-0400) Subject: teximg: If the log isn't written, avoid ugly error messages. X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/9d93029f010c5eaa73ecbce8eb887d9132b7311a?hp=-c teximg: If the log isn't written, avoid ugly error messages. --- 9d93029f010c5eaa73ecbce8eb887d9132b7311a 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); diff --git a/debian/changelog b/debian/changelog index 16c5fa65c..6012bc3bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,7 @@ ikiwiki (2.48) UNRELEASED; urgency=low mailed. * The password_cost config setting is provided as a "more security" knob. * teximg: Fix logurl. + * teximg: If the log isn't written, avoid ugly error messages. -- Joey Hess Wed, 28 May 2008 03:07:37 -0400