Changeset 1503


Ignore:
Timestamp:
2000-09-06T10:45:00+12:00 (24 years ago)
Author:
davidb
Message:

A bit of extra error checking.

File:
1 edited

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
Note: See TracChangeset for help on using the changeset viewer.