From 22839215fbbafa51f69e3ce8d21cb3fa1fcc9d41 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Jul 2008 16:21:01 -0400 Subject: [PATCH] check for tempfile being empty --- IkiWiki/Plugin/attachment.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index 53d826178..f49fe63f7 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -88,8 +88,8 @@ sub formbuilder (@) { #{{{ # of the temp file that CGI writes the upload to. my $tempfile=$q->tmpFileName($filename); - if (! defined $tempfile) { - error("failed to determine temp filename"); + if (! defined $tempfile || ! length $tempfile) { + error("failed to determine tempfile name"); } $filename=IkiWiki::titlepage( -- 2.26.2