Fixing error trap routine in picture-upload.pl
authorChris Nighswonger <cnighswonger@foundations.edu>
Sat, 23 Feb 2008 11:28:06 +0000 (06:28 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Sat, 23 Feb 2008 16:55:43 +0000 (10:55 -0600)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
tools/picture-upload.pl

index b08b656..3bd4acc 100755 (executable)
@@ -46,7 +46,7 @@ if ( $uploadfile ) {
 
         close $tfh;
 
-        unless (system("unzip $tempfile -d $dirname")) {
+        unless (system("unzip $tempfile -d $dirname") == 0) {
             $errors{'UZIPFAIL'} = $uploadfilename;
            $template->param( ERRORS => [ \%errors ] );
             output_html_with_http_headers $input, $cookie, $template->output;   # This error is fatal to the import, so bail out here