From 76f75267627ab1d0d4ed5d672ea38321529f7e75 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Thu, 6 Jun 2002 00:34:42 +0000 Subject: [PATCH] Now inserts warning into the log file and returns no filename if a file could not be written due to permission or directory problem. --- lib/WebGUI/Attachment.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/WebGUI/Attachment.pm b/lib/WebGUI/Attachment.pm index 741cb1c14..51a7ddc01 100644 --- a/lib/WebGUI/Attachment.pm +++ b/lib/WebGUI/Attachment.pm @@ -432,6 +432,8 @@ sub save { close($file); _createThumbnail($_[0],$_[2]); } else { + WebGUI::ErrorHandler::warn("Couldn't open file ".$_[0]->getPath." for writing."); + $_[0]->{_filename} = ""; return ""; } return $_[0]->getFilename;