From 9d93029f010c5eaa73ecbce8eb887d9132b7311a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 29 May 2008 19:29:40 -0400 Subject: [PATCH] teximg: If the log isn't written, avoid ugly error messages. --- IkiWiki/Plugin/teximg.pm | 11 ++++++----- debian/changelog | 1 + 2 files changed, 7 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); 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 -- 2.32.0.93.g670b81a890