Changeset 1503

Show
Ignore:
Timestamp:
06.09.2000 10:45:00 (19 years ago)
Author:
davidb
Message:

A bit of extra error checking.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/ZIPPlug.pm

    r1424 r1503  
    9191    # save current working directory 
    9292    my $cwd = cwd(); 
    93     chdir ($tmpdir) || die; 
     93    chdir ($tmpdir) || die "Unable to change to $tmpdir"; 
    9494    &util::cp ($filename, $tmpdir); 
    9595     
     
    104104    } 
    105105 
    106     chdir ($cwd) || die; 
     106    chdir ($cwd) || die "Unable to change back to $cwd"; 
    107107 
    108108    my $numdocs = &plugin::read ($pluginfo, "", $tmpdir, $metadata, $processor, $maxdocs); 
     
    118118    my $self = shift (@_); 
    119119    my ($file) = @_; 
    120     system ("bunzip $file"); 
     120    if (system ("bunzip $file")!=0) 
     121    { 
     122    &util::rm ($file); 
     123    } 
    121124} 
    122125 
     
    138141    my $self = shift (@_); 
    139142    my ($file) = @_; 
    140     system ("gunzip $file"); 
     143    if (system ("gunzip $file")!=0) 
     144    { 
     145    &util::rm ($file); 
     146    }; 
    141147} 
    142148