Changeset 23946 for main/trunk/greenstone2/perllib/basebuilder.pm
- Timestamp:
- 2011-04-21T21:06:54+12:00 (13 years ago)
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.