Changeset 17313


Ignore:
Timestamp:
2008-09-18T09:02:39+12:00 (16 years ago)
Author:
kjdon
Message:

this seemed to have been forgotten in the 'removing metadata form metadata_read' commit. Also, added ~ to block_exp so that tilda files are not processed and don't show up as errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/DirectoryPlugin.pm

    r16848 r17313  
    132132    my $self = shift (@_);
    133133   
    134     return '(?i)(CVS|\.svn|Thumbs\.db)';
     134    return '(?i)(CVS|\.svn|Thumbs\.db|~$)';
    135135}
    136136
     
    370370   
    371371    # apply metadata pass for each of the files in the directory
    372     my $out_metadata;
    373372    my $num_files = scalar(@dir);
    374373    for (my $i = 0; $i < scalar(@dir); $i++) {
     
    389388    $count += &plugin::metadata_read ($pluginfo, $this_file_base_dir,
    390389                      $file_subfile,$block_hash,
    391                       $out_metadata, \@extrametakeys, \%extrametadata,
     390                      \@extrametakeys, \%extrametadata,
    392391                      $processor, $maxdocs, $gli);
    393392    $additionalmetadata = 1;
     
    465464        next;
    466465    }
    467    
     466    #print STDERR "processing $full_filename\n";
    468467    # Follow Windows shortcuts
    469468    if ($subfile =~ /(?i)\.lnk$/ && $ENV{'GSDLOS'} =~ /^windows$/i) {
     
    500499
    501500    # Make a copy of $in_metadata to pass to $subfile
    502     $out_metadata = {};
     501    my $out_metadata = {};
    503502    &metadatautil::combine_metadata_structures($out_metadata, $in_metadata);
    504503
     
    507506        &metadatautil::combine_metadata_structures($out_metadata, $self->{'assocfile_info'}->{$full_filename});
    508507    }
    509         ## encode the filename as perl5 doesn't handle unicode filenames       
     508        ## encode the filename as perl5 doesn't handle unicode filenames   
     509       
    510510        my $tmpfile = Encode::encode_utf8($subfile);
    511 
     511    #print STDERR "subfile = $subfile, tmpfile = $tmpfile\n";
    512512    # Next add metadata read in XML files (if it is supplied)
    513513    if ($additionalmetadata == 1) {
     
    515515        my ($filespec, $mdref);
    516516        foreach $filespec (@extrametakeys) {
     517        #print STDERR "filespec $filespec\n";
    517518                ## use the utf8 encoded filename to do the filename comparison
    518519        if ($tmpfile =~ /^$filespec$/) {
Note: See TracChangeset for help on using the changeset viewer.