Ignore:
Timestamp:
2011-04-21T21:06:54+12:00 (13 years ago)
Author:
ak19
Message:

Xiaofeng found that the OAI-related changes to do with earliestDatestamp were causing problems for him when a die statement got executed. It just prints a warning now.

File:
1 edited

Legend:

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

    r23943 r23946  
    718718    if (!-f $earliestDatestampFile && -d $archivedir) {
    719719    my $current_time_in_seconds = time; # in seconds
    720     open(FOUT, ">$earliestDatestampFile") ||
    721         (&gsprintf(STDERR, "{common.cannot_open}: $!\n", $earliestDatestampFile) && die);
    722     # die "{common.cannot_open} $earliestDatestampFile: $!\n";
    723     print FOUT $current_time_in_seconds;
    724     close(FOUT);
     720
     721    if(open(FOUT, ">$earliestDatestampFile")) {
     722        # || (&gsprintf(STDERR, "{common.cannot_open}: $!\n", $earliestDatestampFile) && die);
     723        print FOUT $current_time_in_seconds;
     724        close(FOUT);
     725    }
     726    else {
     727        &gsprintf(STDERR, "{import.cannot_write_earliestdatestamp}\n", $earliestDatestampFile);
     728    }
     729
    725730    }
    726731
     
    886891        $doc::OIDcount = $OIDcount;     
    887892    }
    888     else {
    889        
    890         print STDERR "Warning: unable to read document OID count from $oid_count_filename\n";
    891         print STDERR "Setting value to 0\n";
     893    else {     
     894        &gsprintf(STDERR, "{import.cannot_read_OIDcount}\n", $oid_count_filename);
    892895    }
    893896    }
     
    910913    }
    911914    else {
    912     print STDERR "Warning: unable to store document OID count\n";
     915    &gsprintf(STDERR, "{import.cannot_write_OIDcount}\n", $oid_count_filename);
    913916    }
    914917}
Note: See TracChangeset for help on using the changeset viewer.