summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-08 16:21:01 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-08 16:21:01 -0400
commit22839215fbbafa51f69e3ce8d21cb3fa1fcc9d41 (patch)
tree518b3c321fc74ed03d0c0ca63b0c81ffe0bc97af /IkiWiki
parent5a9faa0affbe041e20a4ce7b5abe09e95fa31b2f (diff)
check for tempfile being empty
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/attachment.pm4
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(