Changeset 23132


Ignore:
Timestamp:
2010-10-13T14:24:22+13:00 (12 years ago)
Author:
kjdon
Message:

for manifest files, if the user has specified Index (not Reindex) and the file already existed, then print a warning and don't process it again.

File:
1 edited

Legend:

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

    r23119 r23132  
    601601    }
    602602
     603    my $arcinfo_src_filename = &dbutil::get_infodb_file_path($collectcfg->{'infodbtype'}, "archiveinf-src", $archivedir);
     604    my $arcinfodb_map = {};
     605    &dbutil::read_infodb_file($collectcfg->{'infodbtype'}, $arcinfo_src_filename, $arcinfodb_map);
    603606    foreach my $f (@full_new_files) {
    604         $block_hash->{'new_files'}->{$f} = 1;
    605     }
     607        # check that we haven't seen it already
     608        if (defined $arcinfodb_map->{$f}) {
     609        # TODO make better warning
     610        print STDERR "Warning: $f already in src archive, \n";
     611        } else {
     612        $block_hash->{'new_files'}->{$f} = 1;
     613        }
     614    }
     615
     616    undef $arcinfodb_map;
    606617    }
    607618    else {
Note: See TracChangeset for help on using the changeset viewer.