Changeset 33167

Show
Ignore:
Timestamp:
18.06.2019 09:32:04 (4 weeks ago)
Author:
kjdon
Message:

need to test for existence of rev info db before opening it - it won't be there if we are doing a full re-import

Files:
1 modified

Legend:

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

    r32614 r33167  
    177177    my $rev_infodb_map = {}; 
    178178 
    179     &dbutil::read_infodb_file($self->{'infodbtype'}, $rev_filename, $rev_infodb_map); 
    180  
    181     foreach my $srcfile ( keys %$rev_infodb_map ) { 
    182  
    183     my $vals = $rev_infodb_map->{$srcfile}; 
    184  
    185     $srcfile = &util::placeholders_to_abspath($srcfile); 
    186     foreach my $OID ($vals =~ m/^<oid>(.*)$/gm) { 
    187         $self->add_reverseinfo($srcfile,$OID); 
     179    if ((defined $rev_filename) && &FileUtils::fileExists($rev_filename)) { 
     180    &dbutil::read_infodb_file($self->{'infodbtype'}, $rev_filename, $rev_infodb_map); 
     181 
     182    foreach my $srcfile ( keys %$rev_infodb_map ) { 
     183         
     184        my $vals = $rev_infodb_map->{$srcfile}; 
     185         
     186        $srcfile = &util::placeholders_to_abspath($srcfile); 
     187        foreach my $OID ($vals =~ m/^<oid>(.*)$/gm) { 
     188        $self->add_reverseinfo($srcfile,$OID); 
     189        } 
    188190    } 
    189191    }