Ignore:
Timestamp:
2009-12-09T15:32:17+13:00 (14 years ago)
Author:
kjdon
Message:

check return values for remove_one, and stop the pipeline once found something positive

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugin.pm

    r21307 r21314  
    233233    my $src_rec = GDBMUtils::gdbmRecordToHash($arcinfo_src_filename,$file);
    234234    my $oids = $src_rec->{'oid'};
    235     map {$_->remove_one($file, $oids); } @$pluginfo;
     235    my $rv;
     236    foreach my $plugobj (@$pluginfo) {
     237
     238        $rv = $plugobj->remove_one($file, $oids, $archivedir);
     239        if (defined $rv && $rv != -1) {
     240        return $rv;
     241        } # else undefined (was not recognised by the plugin) or there was an error, try the next one
     242    }
     243    return 0;
    236244    }
    237245
Note: See TracChangeset for help on using the changeset viewer.