From 6f3c980e2b2e618eeccfd64418eb508de54982b4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Jul 2008 12:16:36 -0400 Subject: undef $fh before opening --- IkiWiki/Plugin/attachment.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'IkiWiki') diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index ed1cd61fe..53d826178 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -142,6 +142,7 @@ sub formbuilder (@) { #{{{ if (! defined $fh || ! ref $fh) { # even that doesn't always work, # fall back to opening the tempfile + $fh=undef; open($fh, "<", $tempfile) || error("failed to open $tempfile: $!"); } } -- cgit v1.2.3