Ignore:
Timestamp:
2008-07-14T14:57:38+12:00 (16 years ago)
Author:
kjdon
Message:

global block pass: read_block is no more, use can_process_this_file to see whether a file is for us or not. extra arg (block_hash) to read, read_into_doc_obj, metadata_read etc

File:
1 edited

Legend:

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

    r15872 r16392  
    7979sub read {
    8080    my $self = shift (@_);
    81     my ($pluginfo, $base_dir, $file, $metadata, $processor, $maxdocs, $total_count, $gli) = @_;
     81    my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $processor, $maxdocs, $total_count, $gli) = @_;
    8282    my $outhandle = $self->{'outhandle'};
    8383
    84     #check process and block exps, smart block, etc
    85     my ($block_status,$filename) = $self->read_block(@_);   
    86     return $block_status if ((!defined $block_status) || ($block_status==0));
     84    # can we process this file??
     85    my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file);
     86    return undef unless $self->can_process_this_file($filename_full_path);
    8787
    8888    $file =~ s/^[\/\\]+//; # $file often begins with / so we'll tidy it up
     
    9595    $parent_dir = &util::filename_cat ($base_dir, $parent_dir);
    9696
    97     if (!open (INFILE, $filename)) {
     97    if (!open (INFILE, $filename_full_path)) {
    9898    if ($gli) {
    99         print STDERR "<ProcessingError n='$file' r='Could not read $filename'>\n";
     99        print STDERR "<ProcessingError n='$file' r='Could not read $filename_full_path'>\n";
    100100    }
    101     print $outhandle "GMLPlugin::read - couldn't read $filename\n";
     101    print $outhandle "GMLPlugin::read - couldn't read $filename_full_path\n";
    102102    return -1;
    103103    }
     
    133133
    134134        } else {
    135             print $outhandle "GMLPlugin::read - error in file $filename\n";
     135            print $outhandle "GMLPlugin::read - error in file $filename_full_path\n";
    136136            print $outhandle "text: \"$gml\"\n";
    137137            last;
Note: See TracChangeset for help on using the changeset viewer.