Changeset 32566


Ignore:
Timestamp:
2018-11-02T21:06:21+13:00 (5 years ago)
Author:
ak19
Message:

In some ways, it may be better if plugin.pm::remove_some() didn't return after the first failure, since the return value is never checked or acted upon, but continues attempting to process the remainder of its list of files to be deleted/reindexed.

File:
1 edited

Legend:

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

    r32565 r32566  
    252252    my $arcinfo_src_filename = &dbutil::get_infodb_file_path($infodbtype, "archiveinf-src", $archivedir);
    253253
     254    my $all_files_processed_successfully = 1;
     255   
    254256    foreach my $file (@$deleted_files) {
    255257    # use 'archiveinf-src' info database to look up all the OIDs
     
    275277    if (!$processed_file) { # no plugin could recognise file.
    276278        # Should we continue processing other deleted files or not?
    277         print STDERR "WARNING: plugin::remove_some() failed to process $file with oid(s) ". join(",", $oids) . "\n";
    278         return 0;
     279        print STDERR "WARNING: plugin::remove_some() failed to process $file with oid(s) ". join(",", @$oids) . "\n";
     280        #return 0;
     281        $all_files_processed_successfully = $processed_file && $all_files_processed_successfully;       
    279282    } # else some plugin processed the current deleted file
    280283      # continue to process next deleted file
    281284   
    282285    }
    283     return 1; # if we got here, all deleted files got processed successfully
     286    return $all_files_processed_successfully; # callers don't seem to do anything with return val
    284287}
    285288
Note: See TracChangeset for help on using the changeset viewer.