Changeset 23946
- Timestamp:
- 2011-04-21T21:06:54+12:00 (13 years ago)
- Location:
- main/trunk/greenstone2/perllib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/basebuilder.pm
r23939 r23946 565 565 if(!-d $archivedir) { 566 566 $archivedir = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "export"); 567 } 568 if(-d $archivedir) { 569 my $earliestDatestampFile = &util::filename_cat ($archivedir, "earliestDatestamp"); 570 open(FIN,"<$earliestDatestampFile") || die "{common.cannot_open} $earliestDatestampFile: $!\n"; 571 my $earliestDatestamp; 567 } 568 my $earliestDatestampFile = &util::filename_cat ($archivedir, "earliestDatestamp"); 569 my $earliestDatestamp = 0; 570 if (open(FIN,"<$earliestDatestampFile")) { 572 571 { 573 572 # slurp in file as a single line … … 576 575 #&unicode::ensure_utf8(\$earliestDatestamp); # turn any high bytes that aren't valid utf-8 into utf-8. 577 576 } 578 close(FIN); 579 $build_cfg->{'earliestDatestamp'} = $earliestDatestamp; 580 } 581 577 close(FIN); 578 } 579 else { 580 print $outhandle "Warning: unable to read collection's earliestDatestamp from $earliestDatestampFile.\n"; 581 print $outhandle "Setting value to 0.\n"; 582 } 583 $build_cfg->{'earliestDatestamp'} = $earliestDatestamp; 584 582 585 $self->build_cfg_extra($build_cfg); 583 586 -
main/trunk/greenstone2/perllib/inexport.pm
r23943 r23946 718 718 if (!-f $earliestDatestampFile && -d $archivedir) { 719 719 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 725 730 } 726 731 … … 886 891 $doc::OIDcount = $OIDcount; 887 892 } 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); 892 895 } 893 896 } … … 910 913 } 911 914 else { 912 print STDERR "Warning: unable to store document OID count\n";915 &gsprintf(STDERR, "{import.cannot_write_OIDcount}\n", $oid_count_filename); 913 916 } 914 917 } -
main/trunk/greenstone2/perllib/strings.properties
r23826 r23946 236 236 import.cannot_open_fail_log:ERROR: Couldn't open fail log %s 237 237 238 import.cannot_read_OIDcount:Warning: unable to read document OID count from %s.\nSetting value to 0. 239 240 #import.cannot_read_earliestdatestamp:Warning: unable to read collection's earliestDatestampcount from %s.\nSetting value to 0. 241 238 242 import.cannot_sort:WARNING: import.pl cannot sort documents when groupsize > 1. sortmeta option will be ignored. 243 244 import.cannot_write_earliestdatestamp:Warning: unable to store collection's earliestDatestamp in %s. 245 246 import.cannot_write_OIDcount:Warning: unable to store document OID count in %s. 239 247 240 248 import.collectdir:The path of the "collect" directory.
Note:
See TracChangeset
for help on using the changeset viewer.