diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-08 16:21:01 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-08 16:21:01 -0400 |
commit | 22839215fbbafa51f69e3ce8d21cb3fa1fcc9d41 (patch) | |
tree | 518b3c321fc74ed03d0c0ca63b0c81ffe0bc97af | |
parent | 5a9faa0affbe041e20a4ce7b5abe09e95fa31b2f (diff) |
check for tempfile being empty
-rw-r--r-- | IkiWiki/Plugin/attachment.pm | 4 |
1 files 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( |