View | Details | Raw Unified | Return to bug 20564
Collapse All | Expand All

(-)a/tools/picture-upload.pl (-1 / +3 lines)
Lines 115-121 if ( ( $op eq 'Upload' ) && $uploadfile ) { Link Here
115
    }
115
    }
116
    close $tfh;
116
    close $tfh;
117
    if ( $filetype eq 'zip' ) {
117
    if ( $filetype eq 'zip' ) {
118
        unless ( system( "unzip", $tempfile, '-d', $dirname ) == 0 ) {
118
        qx/unzip $tempfile -d $dirname/;
119
        my $exit_code = $?;
120
        unless ( $exit_code == 0 ) {
119
            $errors{'UZIPFAIL'} = $uploadfilename;
121
            $errors{'UZIPFAIL'} = $uploadfilename;
120
            $template->param( ERRORS => [ \%errors ] );
122
            $template->param( ERRORS => [ \%errors ] );
121
            # This error is fatal to the import, so bail out here
123
            # This error is fatal to the import, so bail out here
(-)a/tools/upload-cover-image.pl (-2 / +3 lines)
Lines 104-110 if ($fileID) { Link Here
104
    else {
104
    else {
105
        my $filename = $upload->full_path;
105
        my $filename = $upload->full_path;
106
        my $dirname = File::Temp::tempdir( CLEANUP => 1 );
106
        my $dirname = File::Temp::tempdir( CLEANUP => 1 );
107
        unless ( system( "unzip", $filename, '-d', $dirname ) == 0 ) {
107
        qx/unzip $filename -d $dirname/;
108
        my $exit_code = $?;
109
        unless ( $exit_code == 0 ) {
108
            $error = 'UZIPFAIL';
110
            $error = 'UZIPFAIL';
109
        }
111
        }
110
        else {
112
        else {
111
- 

Return to bug 20564