Ignore:
Timestamp:
2010-10-26T15:33:45+13:00 (14 years ago)
Author:
kjdon
Message:

metadata_read no longer takes maxdocs args - metadata_read must process all docs, so that whatever few are actually processed by read will get their metadata

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/DirectoryPlugin.pm

    r23171 r23212  
    336336    my ($pluginfo, $base_dir, $file, $block_hash,
    337337    $extrametakeys, $extrametadata, $extrametafile,
    338     $processor, $maxdocs, $gli) = @_;
     338    $processor, $gli, $aux) = @_;
    339339
    340340    return undef;
     
    379379    # Recur over directory contents.
    380380    my (@dir, $subfile);
    381     my $count = 0;
    382381   
    383382    print $outhandle "DirectoryPlugin read: getting directory $dirname\n" if ($verbosity > 2);
     
    433432    }
    434433    }
    435     # apply metadata pass for each of the files in the directory
     434    # apply metadata pass for each of the files in the directory -- ignore
     435    # maxdocs here
    436436    my $num_files = scalar(@dir);
    437437    for (my $i = 0; $i < scalar(@dir); $i++) {
    438438    my $subfile = $dir[$i];
    439439    my $this_file_base_dir = $base_dir;
    440     last if ($maxdocs != -1 && $count >= $maxdocs);
    441440    next if ($subfile =~ m/^\.\.?$/);
    442441    my $file_subfile = &util::filename_cat($file, $subfile);
     
    450449    print $outhandle "DirectoryPlugin metadata recurring: $subfile\n" if ($verbosity > 2);
    451450   
    452     $count += &plugin::metadata_read ($pluginfo, $this_file_base_dir,
    453                       $file_subfile,$block_hash,
    454                       \@extrametakeys, \%extrametadata,
    455                       \%extrametafile,
    456                       $processor, $maxdocs, $gli);
     451    &plugin::metadata_read ($pluginfo, $this_file_base_dir,
     452                $file_subfile,$block_hash,
     453                \@extrametakeys, \%extrametadata,
     454                \%extrametafile,
     455                $processor, $gli);
    457456    $additionalmetadata = 1;
    458457    }
     
    485484   
    486485    # import each of the files in the directory
    487     $count=0;
     486    my $count=0;
    488487    for (my $i = 0; $i <= scalar(@dir); $i++) {
    489488    # When every file in the directory has been done, pause for a moment (figuratively!)
Note: See TracChangeset for help on using the changeset viewer.