Changeset 19789
- Timestamp:
- 2009-06-10T13:43:04+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/inexport.pm
r19498 r19789 27 27 28 28 use strict; 29 30 use File::Basename; 29 31 30 32 use util; … … 179 181 my ($file,$doc_rec) = @_; 180 182 183 my ($file_root,$dirname,$suffix) = fileparse($file, "\\.[^\\.]+\$"); 184 181 185 foreach my $af (@{$doc_rec->{'assoc-file'}}) { 182 return 1 if ($af eq $file); 186 my $full_af = &util::filename_cat($dirname,$af); 187 188 return 1 if ($full_af eq $file); 183 189 } 184 190 … … 200 206 foreach my $file (@$deleted_files) { 201 207 # use 'archiveinf-src' GDBM file to look up all the OIDs 202 # th is file is used in (note in most cases, it's just one OID)208 # that this file is used in (note in most cases, it's just one OID) 203 209 204 210 my $src_rec = GDBMUtils::gdbmRecordToHash($arcinfo_src_filename,$file); … … 245 251 246 252 $block_hash->{'reindex_files'}->{$src_filename} = 1; 253 254 # remove the metadata file from the src-database 255 GDBMUtils::gdbmDatabaseRemove($arcinfo_src_filename,$file); 247 256 } 248 257 else { … … 254 263 # Whether the main file directly or indirectly, mark for deletion/reindex 255 264 256 if ($verbosity>1) {257 print STDERR "$oid ($src_file) marked to be $mode_text on next buildcol.pl\n";258 }259 $archive_info->set_status_info($oid,"D");260 261 265 my $val = &GDBMUtils::gdbmDatabaseGet($arcinfo_doc_filename,$oid); 262 266 my ($index_status) = ($val =~ m/^<index-status>(.*)$/m); 267 268 263 269 if ($index_status ne "D") { 270 if ($verbosity>1) { 271 print STDERR "$oid ($src_file) marked to be $mode_text on next buildcol.pl\n"; 272 } 273 $archive_info->set_status_info($oid,"D"); 274 264 275 $val =~ s/^<index-status>(.*)$/<index-status>D/m; 265 276 &GDBMUtils::gdbmDatabaseSet($arcinfo_doc_filename,$oid,$val); 277 278 GDBMUtils::gdbmDatabaseRemove($arcinfo_src_filename,$src_file); 266 279 } 267 280 268 GDBMUtils::gdbmDatabaseRemove($arcinfo_src_filename,$src_file); 281 269 282 } 270 283
Note:
See TracChangeset
for help on using the changeset viewer.