- Timestamp:
- 2008-09-18T09:02:39+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/DirectoryPlugin.pm
r16848 r17313 132 132 my $self = shift (@_); 133 133 134 return '(?i)(CVS|\.svn|Thumbs\.db )';134 return '(?i)(CVS|\.svn|Thumbs\.db|~$)'; 135 135 } 136 136 … … 370 370 371 371 # apply metadata pass for each of the files in the directory 372 my $out_metadata;373 372 my $num_files = scalar(@dir); 374 373 for (my $i = 0; $i < scalar(@dir); $i++) { … … 389 388 $count += &plugin::metadata_read ($pluginfo, $this_file_base_dir, 390 389 $file_subfile,$block_hash, 391 $out_metadata,\@extrametakeys, \%extrametadata,390 \@extrametakeys, \%extrametadata, 392 391 $processor, $maxdocs, $gli); 393 392 $additionalmetadata = 1; … … 465 464 next; 466 465 } 467 466 #print STDERR "processing $full_filename\n"; 468 467 # Follow Windows shortcuts 469 468 if ($subfile =~ /(?i)\.lnk$/ && $ENV{'GSDLOS'} =~ /^windows$/i) { … … 500 499 501 500 # Make a copy of $in_metadata to pass to $subfile 502 $out_metadata = {};501 my $out_metadata = {}; 503 502 &metadatautil::combine_metadata_structures($out_metadata, $in_metadata); 504 503 … … 507 506 &metadatautil::combine_metadata_structures($out_metadata, $self->{'assocfile_info'}->{$full_filename}); 508 507 } 509 ## encode the filename as perl5 doesn't handle unicode filenames 508 ## encode the filename as perl5 doesn't handle unicode filenames 509 510 510 my $tmpfile = Encode::encode_utf8($subfile); 511 511 #print STDERR "subfile = $subfile, tmpfile = $tmpfile\n"; 512 512 # Next add metadata read in XML files (if it is supplied) 513 513 if ($additionalmetadata == 1) { … … 515 515 my ($filespec, $mdref); 516 516 foreach $filespec (@extrametakeys) { 517 #print STDERR "filespec $filespec\n"; 517 518 ## use the utf8 encoded filename to do the filename comparison 518 519 if ($tmpfile =~ /^$filespec$/) {
Note:
See TracChangeset
for help on using the changeset viewer.