Changeset 32566

Show
Ignore:
Timestamp:
02.11.2018 21:06:21 (2 weeks 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.

Files:
1 modified

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