From: Joey Hess Date: Tue, 8 Jul 2008 20:21:01 +0000 (-0400) Subject: check for tempfile being empty X-Git-Tag: 2.53~33 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/22839215fbbafa51f69e3ce8d21cb3fa1fcc9d41 check for tempfile being empty --- 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(