Changeset 28211 for main/trunk/greenstone2/perllib/inexport.pm
- Timestamp:
- 2013-09-04T21:46:07+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/inexport.pm
r28077 r28211 729 729 &dbutil::read_infodb_file($collectcfg->{'infodbtype'}, $arcinfo_src_filename, $arcinfodb_map); 730 730 foreach my $f (@full_new_files) { 731 my $rel_f = &util::abspath_to_placeholders($f); 732 731 733 # check that we haven't seen it already 732 if (defined $arcinfodb_map->{$ f}) {734 if (defined $arcinfodb_map->{$rel_f}) { 733 735 # TODO make better warning 734 print STDERR "Warning: $f already in src archive, \n";736 print STDERR "Warning: $f ($rel_f) already in src archive, \n"; 735 737 } else { 736 738 $block_hash->{'new_files'}->{$f} = 1; … … 1283 1285 # that this file is used in (note in most cases, it's just one OID) 1284 1286 1285 my $src_rec = &dbutil::read_infodb_entry($infodbtype, $arcinfo_src_filename, $file); 1287 my $relfile = &util::abspath_to_placeholders($file); 1288 1289 my $src_rec = &dbutil::read_infodb_entry($infodbtype, $arcinfo_src_filename, $relfile); 1286 1290 my $oids = $src_rec->{'oid'}; 1287 1291 my $file_record_deleted = 0; … … 1289 1293 # delete the src record 1290 1294 my $src_infodb_file_handle = &dbutil::open_infodb_write_handle($infodbtype, $arcinfo_src_filename, "append"); 1291 &dbutil::delete_infodb_entry($infodbtype, $src_infodb_file_handle, $ file);1295 &dbutil::delete_infodb_entry($infodbtype, $src_infodb_file_handle, $relfile); 1292 1296 &dbutil::close_infodb_write_handle($infodbtype, $src_infodb_file_handle); 1293 1297 … … 1298 1302 my $doc_rec = &dbutil::read_infodb_entry($infodbtype, $arcinfo_doc_filename, $oid); 1299 1303 my $doc_source_file = $doc_rec->{'src-file'}->[0]; 1304 $doc_source_file = &util::placeholders_to_abspath($doc_source_file); 1305 1300 1306 if (!&util::filename_is_absolute($doc_source_file)) { 1301 1307 $doc_source_file = &FileUtils::filenameConcatenate($ENV{'GSDLCOLLECTDIR'},$doc_source_file);
Note:
See TracChangeset
for help on using the changeset viewer.