- Timestamp:
- 2009-02-06T18:19:44+13:00 (15 years ago)
- Location:
- gsdl/trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/bin/script/import.pl
r18456 r18469 572 572 # gobal blocking pass may set up some metadata 573 573 &plugin::file_block_read($pluginfo, $importdir, "", $block_hash, $metadata, $gli); 574 # Can now work out which files were new, already existed, and have 575 # been deleted 576 577 &inexport::new_vs_old_import_diff($archive_info,$block_hash,$importdir); 578 579 my @deleted_files = sort keys %{$block_hash->{'deleted_files'}}; 580 if (scalar(@deleted_files>0)) { 581 print STDERR "Delete files:\n "; 582 print STDERR join("\n ",@deleted_files), "\n"; 583 } 584 585 my @new_files = sort keys %{$block_hash->{'new_files'}}; 586 if (scalar(@new_files>0)) { 587 print STDERR "New files:\n "; 588 print STDERR join("\n ",@new_files), "\n"; 589 } 590 591 &inexport::mark_docs_for_deletion($archive_info,\@deleted_files,$archivedir, 592 $verbosity); 574 575 576 if (!$removeold) { 577 # Can now work out which files were new, already existed, and have 578 # been deleted 579 580 &inexport::new_vs_old_import_diff($archive_info,$block_hash,$importdir); 581 582 my @deleted_files = sort keys %{$block_hash->{'deleted_files'}}; 583 if (scalar(@deleted_files>0)) { 584 print STDERR "Files deleted since last import:\n "; 585 print STDERR join("\n ",@deleted_files), "\n"; 586 } 587 588 my @new_files = sort keys %{$block_hash->{'new_files'}}; 589 if (scalar(@new_files>0)) { 590 print STDERR "New files since last import:\n "; 591 print STDERR join("\n ",@new_files), "\n"; 592 } 593 594 &inexport::mark_docs_for_deletion($archive_info,\@deleted_files, 595 $archivedir,$verbosity); 596 597 my @existing_files = sort keys %{$block_hash->{'existing_files'}}; 598 599 my @reindex_files 600 = &inexport::mark_docs_for_reindex($archive_info,\@existing_files, 601 $archivedir,$verbosity); 602 } 593 603 594 604 &plugin::read ($pluginfo, $importdir, "", $block_hash, $metadata, $processor, $maxdocs, 0, $gli); -
gsdl/trunk/common-src/src/gdbmedit/gdbmdel/gdbmdel.cpp
r18442 r18469 77 77 // open the database 78 78 #ifdef __WIN32__ 79 dbf = gdbm_open (argv[1], block_size, GDBM_ READER, 00664, NULL, 0);79 dbf = gdbm_open (argv[1], block_size, GDBM_WRCREAT, 00664, NULL, 1); 80 80 #else 81 dbf = gdbm_open (argv[1], block_size, GDBM_ READER, 00664, NULL);81 dbf = gdbm_open (argv[1], block_size, GDBM_WRCREAT, 00664, NULL); 82 82 #endif 83 83 if (dbf == NULL) 84 84 { 85 cerr << " couldn't create" << argv[1] << endl;85 cerr << "Couldn't open " << argv[1] << endl; 86 86 exit (-1); 87 87 } … … 96 96 // -1 == key does not exist or there was an error 97 97 98 if (status < 0) { 99 cerr << "Opened database " << argv[1] << endl; 100 cerr << " but couldn't delete: " << argv[2] << endl; 101 } 102 98 103 gdbm_close (dbf); 99 104 -
gsdl/trunk/common-src/src/gdbmedit/gdbmkeys/gdbmkeys.cpp
r18442 r18469 82 82 #endif 83 83 if (dbf == NULL) { 84 cerr << " couldn't open " << argv[1] << endl;84 cerr << "Couldn't open " << argv[1] << endl; 85 85 exit (0); 86 86 } -
gsdl/trunk/common-src/src/gdbmedit/txt2db/txt2db.cpp
r17783 r18469 72 72 char *dbname; 73 73 int append = 0; 74 int delkey = 0; 75 74 76 if (argc == 3) { 75 77 if (strcmp (argv[1], "-append") == 0) { … … 105 107 value = ""; 106 108 107 // look for [key]\n 109 // Parse out 'key' from [key]\n 110 111 // scan for first occurrence of [ 108 112 while (!cin.eof() && c != '[') cin.get(c); 113 109 114 if (!cin.eof()) cin.get(c); // skip [ 115 116 // now look for closing ], building up 'key' as we go 110 117 while (!cin.eof() && c != ']') { 111 118 key.push_back ((unsigned char)c); 112 119 cin.get(c); 113 120 } 114 if (!cin.eof()) cin.get(c); // skip ] 121 122 if (!cin.eof()) { 123 // most likely an eol char, but if '-', then signifies record 124 // is to be deleted, not added 125 cin.get(c); 126 if (c == '-') { 127 delkey = 1; 128 } 129 else { 130 delkey = 0; 131 } 132 } 115 133 while (!cin.eof() && (c == '\n' || c == '\r')) cin.get(c); 116 134 … … 155 173 } 156 174 key_data.dsize = strlen(key_data.dptr); 175 176 if (delkey) { 177 // delete the given key 178 if (gdbm_delete(dbf, key_data) < 0) { 179 cerr << "gdbm_delete returned an error" << endl; 180 } 181 } 182 else { 183 184 // add/append 185 186 // convert value to a datum datatype 187 datum value_data; 188 value_data.dptr = value.getcstr(); 189 if (value_data.dptr == NULL) { 190 cerr << "NULL value_data.dptr" << endl; 191 exit (0); 192 } 193 value_data.dsize = strlen(value_data.dptr); 157 194 158 // convert value to a datum datatype 159 datum value_data; 160 value_data.dptr = value.getcstr(); 161 if (value_data.dptr == NULL) { 162 cerr << "NULL value_data.dptr" << endl; 163 exit (0); 164 } 165 value_data.dsize = strlen(value_data.dptr); 166 167 // store the value 168 if (gdbm_store (dbf, key_data, value_data, GDBM_REPLACE) < 0) { 169 cerr << "gdbm_store returned an error" << endl; 170 exit (0); 171 } 172 195 // store the value 196 if (gdbm_store (dbf, key_data, value_data, GDBM_REPLACE) < 0) { 197 cerr << "gdbm_store returned an error" << endl; 198 exit (0); 199 } 200 201 202 free(value_data.dptr); 203 } 204 173 205 free(key_data.dptr); 174 free(value_data.dptr);175 206 } 176 207 } -
gsdl/trunk/perllib/GDBMUtils.pm
r18456 r18469 93 93 94 94 # Remove the document from the database 95 print STDERR "#Set document\ncmd: gdbmset$exe \"$database\" \"$oid\"\n" if $debug; 96 97 `gdbmdel$exe "$database" "$oid"`; 95 96 my $cmd = "gdbmdel$exe \"$database\" \"$oid\""; 97 print STDERR "#Delete document\ncmd: $cmd" if $debug; 98 99 `$cmd`; 100 98 101 } 99 102 -
gsdl/trunk/perllib/arcinfo.pm
r18456 r18469 251 251 } 252 252 253 $self->delete_info ($OID); 253 if (defined $self->{'info'}->{$OID}) { 254 # test to see if we are in a reindex situation 255 256 my $existing_status_info = $self->get_status_info($OID); 257 258 if ($existing_status_info eq "D") { 259 # yes, we're in a reindexing situation 260 $self->delete_info ($OID); 261 262 263 # force setting to "reindex" 264 $index_status = "R"; 265 266 } 267 else { 268 # some other, possibly erroneous, situation has arisen 269 # where the document already seems to exist 270 print STDERR "Warning: $OID already exists with index status $existing_status_info\n"; 271 print STDERR " Deleting previous version\n"; 272 273 $self->delete_info ($OID); 274 } 275 } 276 254 277 $self->{'info'}->{$OID} = [$doc_file,$index_status]; 255 278 push (@{$self->{'order'}}, [$OID, $sortmeta]); 279 280 256 281 } 257 282 -
gsdl/trunk/perllib/basebuilder.pm
r18441 r18469 424 424 425 425 # Output classifier reverse lookup, used in incremental deletion 426 # &classify::print_reverse_lookup($infodb_handle);426 ####&classify::print_reverse_lookup($infodb_handle); 427 427 428 428 # output doclist -
gsdl/trunk/perllib/basebuildproc.pm
r18463 r18469 343 343 { 344 344 my $self = shift (@_); 345 my ($field ) = @_;345 my ($field,$edit_mode) = @_; 346 346 347 347 # Keep some statistics relating to metadata sets used and … … 355 355 my $core_field = $2; 356 356 357 $self->{'doc_mdprefix_fields'}->{$prefix}->{$core_field}++; 358 $self->{'mdprefix_fields'}->{$prefix}->{$core_field}++; 357 if (($edit_mode eq "add") || ($edit_mode eq "reindex")) { 358 $self->{'doc_mdprefix_fields'}->{$prefix}->{$core_field}++; 359 $self->{'mdprefix_fields'}->{$prefix}->{$core_field}++; 360 } 361 else { 362 # delete 363 $self->{'doc_mdprefix_fields'}->{$prefix}->{$core_field}--; 364 $self->{'mdprefix_fields'}->{$prefix}->{$core_field}--; 365 } 366 359 367 } 360 368 elsif ($field =~ m/^[[:upper:]]/) { 361 369 # implicit 'ex' metadata set 362 370 363 $self->{'doc_mdprefix_fields'}->{'ex'}->{$field}++; 364 $self->{'mdprefix_fields'}->{'ex'}->{$field}++; 371 if (($edit_mode eq "add") || ($edit_mode eq "reindex")) { 372 373 $self->{'doc_mdprefix_fields'}->{'ex'}->{$field}++; 374 $self->{'mdprefix_fields'}->{'ex'}->{$field}++; 375 } 376 else { 377 # delete 378 $self->{'doc_mdprefix_fields'}->{'ex'}->{$field}--; 379 $self->{'mdprefix_fields'}->{'ex'}->{$field}--; 380 } 365 381 } 366 382 … … 425 441 # delete 426 442 $self->{'num_docs'} -= 1 unless ($doctype eq "classification"); 427 return;428 443 } 429 444 … … 448 463 449 464 # update a few statistics 450 $self->{'num_bytes'} += $doc_obj->get_text_length ($section); 451 $self->{'num_sections'} += 1 unless ($doctype eq "classification"); 465 if (($edit_mode eq "add") || ($edit_mode eq "reindex")) { 466 467 $self->{'num_bytes'} += $doc_obj->get_text_length ($section); 468 $self->{'num_sections'} += 1 unless ($doctype eq "classification"); 469 } 470 else { 471 # delete 472 $self->{'num_bytes'} -= $doc_obj->get_text_length ($section); 473 $self->{'num_sections'} -= 1 unless ($doctype eq "classification"); 474 } 452 475 453 476 # output the fact that this document is a document (unless doctype … … 488 511 # special case for URL metadata 489 512 if ($field =~ /^URL$/i) { 490 &dbutil::write_infodb_entry($self->{'infodbtype'}, $infodb_handle, $value, { 'section' => [ $section_OID ] }); 513 if (($edit_mode eq "add") || ($edit_mode eq "reindex")) { 514 515 &dbutil::write_infodb_entry($self->{'infodbtype'}, $infodb_handle, $value, { 'section' => [ $section_OID ] }); 516 } 517 else { 518 # delete 519 &dbutil::delete_infodb_entry($self->{'infodbtype'}, $infodb_handle, $value); 520 } 521 522 491 523 } 492 524 … … 496 528 if ($section eq "" && $self->{'store_metadata_coverage'} =~ /^true$/i) 497 529 { 498 $self->infodb_metadata_stats($field );530 $self->infodb_metadata_stats($field,$edit_mode); 499 531 } 500 532 } … … 565 597 } 566 598 567 &dbutil::write_infodb_entry($self->{'infodbtype'}, $infodb_handle, $section_OID, \%section_infodb); 599 if (($edit_mode eq "add") || ($edit_mode eq "reindex")) { 600 601 &dbutil::write_infodb_entry($self->{'infodbtype'}, $infodb_handle, $section_OID, \%section_infodb); 602 } 603 else { 604 # delete 605 &dbutil::delete_infodb_entry($self->{'infodbtype'}, $infodb_handle, $section_OID); 606 } 607 568 608 569 609 # output a database entry for the document number, except for Lucene (which no longer needs this information) 570 610 unless (ref($self) eq "lucenebuildproc") 571 611 { 572 if ($self->{'db_level'} eq "document") { 573 &dbutil::write_infodb_entry($self->{'infodbtype'}, $infodb_handle, $self->{'num_docs'}, { 'section' => [ $doc_OID ] }); 612 if (($edit_mode eq "add") || ($edit_mode eq "reindex")) { 613 614 if ($self->{'db_level'} eq "document") { 615 &dbutil::write_infodb_entry($self->{'infodbtype'}, $infodb_handle, $self->{'num_docs'}, { 'section' => [ $doc_OID ] }); 616 } 617 else { 618 &dbutil::write_infodb_entry($self->{'infodbtype'}, $infodb_handle, $self->{'num_sections'}, { 'section' => [ $section_OID ] }); 619 } 574 620 } 575 621 else { 576 &dbutil::write_infodb_entry($self->{'infodbtype'}, $infodb_handle, $self->{'num_sections'}, { 'section' => [ $section_OID ] }); 622 623 if ($self->{'db_level'} eq "document") { 624 &dbutil::delete_infodb_entry($self->{'infodbtype'}, $infodb_handle, $self->{'num_docs'}); 625 } 626 else { 627 &dbutil::delete_infodb_entry($self->{'infodbtype'}, $infodb_handle, $self->{'num_sections'}); 628 } 629 577 630 } 578 631 } -
gsdl/trunk/perllib/classify/AZList.pm
r18455 r18469 124 124 my $outhandle = $self->{'outhandle'}; 125 125 126 if ( $edit_mode eq "delete") {126 if (($edit_mode eq "delete") || ($edit_mode eq "reindex")) { 127 127 $self->oid_hash_delete($doc_OID,'list'); 128 return ;128 return if ($edit_mode eq "delete"); 129 129 } 130 130 -
gsdl/trunk/perllib/inexport.pm
r18457 r18469 27 27 28 28 use strict; 29 30 use File::Basename; 29 31 30 32 use util; … … 53 55 } 54 56 57 55 58 # Figure out which are the new files, existing files and so 56 59 # by implication the files from the previous import that are not … … 68 71 } 69 72 73 if (defined $block_hash->{'file_blocks'}->{$full_curr_file}) { 74 # If in block list, we want to ignore it 75 delete $block_hash->{'all_files'}->{$curr_file}; 76 77 if (defined $full_prev_all_files->{$full_curr_file}) { 78 # also make sure it is gone from 'previous' list so 79 # not mistaken for a file that needs to be deleted 80 delete $full_prev_all_files->{$full_curr_file}; 81 } 82 next; 83 } 84 70 85 # figure of if new file or not 71 86 if (defined $full_prev_all_files->{$full_curr_file}) { 87 72 88 # had it before 73 $block_hash->{'existing_files'}->{$curr_file} = 1; 89 $block_hash->{'existing_files'}->{$full_curr_file} = 1; 90 74 91 # Now remove it, so by end of loop only the files 75 92 # that need deleting are left … … 78 95 } 79 96 else { 80 $block_hash->{'new_files'}->{$ curr_file} = 1;97 $block_hash->{'new_files'}->{$full_curr_file} = 1; 81 98 } 82 99 … … 84 101 } 85 102 86 # By this point full_prev_all_files contains only the files 87 # that are not in the current import folder => i.e. files 88 # to be deleted 103 # By this point full_prev_all_files contains the files 104 # mentioned in archiveinf-src.db but are not in the 'import' 105 # folder (or whatever was specified through -importdir ...) 106 107 # This list can contain files that were created in the 'tmp' or 108 # 'cache' areas (such as screen-size and thumbnail images). 89 109 # 90 # The value in each key is its "local" import file name, which is what 91 # we want to use 110 # In building the final list of files to delete, we test to see if 111 # it exists on the filesystem and if it does (unusual for a file 112 # that's allegedly deleted!) , supress it from going into the final 113 # list 114 115 my $collectdir = $ENV{'GSDLCOLLECTDIR'}; 116 92 117 my @deleted_files = values %$full_prev_all_files; 93 map { $block_hash->{'deleted_files'}->{$_} = 1 } @deleted_files; 118 map { my $curr_file = $_; 119 my $full_curr_file = $curr_file; 120 121 if (!&util::filename_is_absolute($curr_file)) { 122 # add in import dir to make absolute 123 124 $full_curr_file = &util::filename_cat($collectdir,$curr_file); 125 } 126 127 128 if (!-e $full_curr_file) { 129 $block_hash->{'deleted_files'}->{$curr_file} = 1; 130 } 131 } @deleted_files; 94 132 } 95 133 … … 110 148 # this file is used in (note in most cases, it's just one OID) 111 149 112 # An improvement would be to have the record read113 # into a hash array114 150 my $src_rec = GDBMUtils::gdbmRecordToHash($arcinfo_src_filename,$file); 115 151 my $oids = $src_rec->{'oid'}; 116 152 foreach my $oid (@$oids) { 117 153 118 # find out if it's an assoc file or main doc154 # Find out if it's an assoc file or main doc 119 155 120 156 my $doc_rec = GDBMUtils::gdbmRecordToHash($arcinfo_doc_filename,$oid); 121 ## print STDERR "file = $file\n";122 123 157 if ($doc_rec->{'src-file'}->[0] eq $file) { 124 # mark it for deletion 158 # It's the main doc 159 # => mark it for deletion 160 125 161 if ($verbosity>1) { 126 print STDERR "$oid marked to be deleted \n";162 print STDERR "$oid marked to be deleted from index on next buildcol.pl\n"; 127 163 } 128 164 $archive_info->set_status_info($oid,"D"); 129 165 130 166 my $val = &GDBMUtils::gdbmDatabaseGet($arcinfo_doc_filename,$oid); 131 $val =~ s/^<index-status>(.*)$/<index-status>D/m; 132 &GDBMUtils::gdbmDatabaseSet($arcinfo_doc_filename,$oid,$val); 167 my ($index_status) = ($val =~ m/^<index-status>(.*)$/m); 168 if ($index_status ne "D") { 169 $val =~ s/^<index-status>(.*)$/<index-status>D/m; 170 &GDBMUtils::gdbmDatabaseSet($arcinfo_doc_filename,$oid,$val); 171 my $doc_file = $doc_rec->{'doc-file'}->[0]; 172 173 my $doc_filename = &util::filename_cat($archivedir,$doc_file); 174 175 176 my ($doc_tailname, $doc_dirname, $suffix) 177 = File::Basename::fileparse($doc_filename, "\\.[^\\.]+\$"); 178 179 print STDERR "Removing $doc_dirname\n" if ($verbosity>2); 180 181 &util::rm_r($doc_dirname); 182 183 } 133 184 } 134 185 else { … … 149 200 } 150 201 } 202 203 GDBMUtils::gdbmDatabaseRemove($arcinfo_src_filename,$file); 151 204 } 152 205 } … … 155 208 156 209 210 sub mark_docs_for_reindex 211 { 212 my ($archive_info,$existing_files_ref,$archivedir,$verbosity) = @_; 213 214 # Reindexing is accomplished by deleting the previously indexed 215 # version of the document, and then allowing the new version to 216 # be indexed (as would a new document be indexed). 217 # 218 # The first step (marking for deletion) is implemented by this routine. 219 # 220 # By default in Greenstone a new version of an index will hash to 221 # a new unique OID, and the above strategy of reindex=delete+add 222 # works fine. A special case arises when a persistent OID is 223 # allocated to a document (for instance through a metadata field), 224 # and the second step to reindexing (see XXXX) detects this and 225 # deals with it appropriately. 226 227 my $db_ext = &util::is_little_endian() ? ".ldb" : ".bdb"; 228 my $doc_db = "archiveinf-doc$db_ext"; 229 my $arcinfo_doc_filename = &util::filename_cat ($archivedir, $doc_db); 230 231 232 my $archiveinf_timestamp = -M $arcinfo_doc_filename; 233 234 my $reindex_files_ref = []; 235 236 foreach my $existing_filename (@$existing_files_ref) { 237 238 if (-M $existing_filename < $archiveinf_timestamp) { 239 # file is newer than last build 240 241 my $existing_file = $existing_filename; 242 my $collectdir = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}); 243 244 $existing_file =~ s/^$collectdir(\\|\/)?//; 245 246 print STDERR "**** Deleting existing file: $existing_file\n"; 247 248 push(@$reindex_files_ref,$existing_file); 249 } 250 251 } 252 253 mark_docs_for_deletion($archive_info,$reindex_files_ref,$archivedir,$verbosity); 254 255 return @$reindex_files_ref; 256 } 257 258 259 157 260 1; -
gsdl/trunk/perllib/plugins/ArchivesInfPlugin.pm
r18456 r18469 90 90 91 91 if (defined $archive_info) { 92 print STDERR "********* have parsed and processed an archive info file\n";93 94 92 my $archive_info_filename = $self->{'archive_info_filename'}; 95 93 … … 100 98 101 99 my $index_status = $archive_info->get_status_info($doc_oid); 102 print STDERR "*** Updating$doc_oid $index_status\n";100 #### print STDERR "*** Away to Update $doc_oid $index_status\n"; 103 101 104 102 if ($index_status eq "D") { 105 103 # delete 106 104 $archive_info->delete_info($doc_oid); 105 &GDBMUtils::gdbmDatabaseRemove($archive_info_filename,$doc_oid); 107 106 } 108 107 elsif ($index_status =~ m/^(I|R)$/) { … … 215 214 my $process_file = 1; 216 215 217 # ...unless the build processor is incremental capable and -incremental was specified 216 # ...unless the build processor is incremental capable and -incremental was specified, in which case we need to check its index_status flag 218 217 if ($processor->is_incremental_capable() && $self->{'incremental'}) 219 218 { … … 230 229 } 231 230 elsif ($index_status eq "R") { 232 # Need to be delete it from the index.231 # Need to be reindexed/replaced 233 232 $new_mode = $curr_mode."reindex"; 233 234 234 $process_file = 1; 235 235 } … … 237 237 # ... or we're being asked to delete it (in which case skip it) 238 238 elsif ($index_status eq "D") { 239 # Delete it somehow from archives dir!! 240 # => get short name, lop off filename, concat archivedir 241 # move to recyle bin 239 # Non-incremental Delete 240 # It's already been deleted from the archives directory 241 # (done during import.pl) 242 # => All we need to do here is not process it 242 243 243 244 $process_file = 0; 244 245 } 246 247 if (!$processor->is_incremental_capable() && $self->{'incremental'}) { 248 # Nag feature 249 if (!defined $self->{'incremental-warning'}) { 250 print $outhandle "\n"; 251 print $outhandle "Warning: command-line option '-incremental' used with *non-incremental*\n"; 252 print $outhandle " processor '", ref $processor, "'. Some conflicts may arise.\n"; 253 print $outhandle "\n"; 254 sleep 10; 255 $self->{'incremental-warning'} = 1; 256 } 257 } 258 259 245 260 246 261 if ($process_file) { -
gsdl/trunk/perllib/plugins/BasePlugin.pm
r18441 r18469 833 833 834 834 my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file); 835 835 836 # create a new document 836 837 my $doc_obj = new doc ($filename_full_path, "indexed_doc", $self->{'file_rename_method'}); … … 840 841 $doc_obj->add_utf8_metadata($top_section, "FileSize", (-s $filename_full_path)); 841 842 843 842 844 # sets the UTF8 filename (Source) for display and sets the url ref to URL encoded version 843 845 # of the UTF8 filename (SourceFile) for generated files 844 846 $self->set_Source_metadata($doc_obj, $filename_no_path); 847 845 848 846 849 # plugin specific stuff - what args do we need here?? … … 946 949 # delete any temp files that we may have created 947 950 $self->clean_up_after_doc_obj_processing(); 951 948 952 949 953 # if process_status == 1, then the file has been processed. -
gsdl/trunk/perllib/plugins/DirectoryPlugin.pm
r18441 r18469 575 575 576 576 if (defined $self->{'inf_timestamp'}) { 577 my $inf_timestamp = $self->{'inf_timestamp'}; 578 579 if (! -d $full_filename) { 580 my $filename_timestamp = -M $full_filename; 581 if ($filename_timestamp > $inf_timestamp) { 582 # filename has been around for longer than inf 583 print $outhandle "**** Skipping $subfile\n" if ($verbosity >3); 584 next; 577 # Look to see if it's a completely new file 578 579 if (!$block_hash->{'new_files'}->{$full_filename}) { 580 # Not a new file, must be an existing file 581 # Let' see if it's newer than the last import.pl 582 583 584 my $inf_timestamp = $self->{'inf_timestamp'}; 585 586 if (! -d $full_filename) { 587 my $filename_timestamp = -M $full_filename; 588 if ($filename_timestamp > $inf_timestamp) { 589 # filename has been around for longer than inf 590 print $outhandle "**** Skipping $subfile\n" if ($verbosity >3); 591 next; 592 } 593 else { 594 # Remove old folder in archives (might hash to something different) 595 # *** should be doing this on a Del one as well 596 # but leave folder name?? and ensure hashs to 597 # same again?? 598 599 # Then let through as new doc?? 600 601 # mark to doc-oids that rely on it for re-indexing 602 ## &GDBMUtils::gdbmDatabase(); 603 604 } 585 605 } 586 606 } -
gsdl/trunk/perllib/util.pm
r18463 r18469 35 35 sub rm { 36 36 my (@files) = @_; 37 37 38 my @filefiles = (); 38 39
Note:
See TracChangeset
for help on using the changeset viewer.