Changeset 16392 for gsdl/trunk/perllib/plugins/FOXPlugin.pm
- Timestamp:
- 2008-07-14T14:57:38+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/FOXPlugin.pm
r15872 r16392 93 93 sub read { 94 94 my $self = shift (@_); 95 my ($pluginfo, $base_dir, $file, $ metadata, $processor, $maxdocs, $total_count, $gli) = @_;95 my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $processor, $maxdocs, $total_count, $gli) = @_; 96 96 97 # check for associate_ext, blocking etc, are we processing this file?98 my ($ block_status,$fullname) = $self->read_block(@_);99 return $block_status if ((!defined $block_status) || ($block_status==0));97 # can we process this file?? 98 my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file); 99 return undef unless $self->can_process_this_file($filename_full_path); 100 100 101 101 print STDERR "<Processing n='$file' p='FOXPlugin'>\n" if ($gli); 102 102 print STDERR "FOXPlugin: processing $file\n" if $self->{'verbosity'} > 1; 103 103 104 my ($parent_dir) = $f ullname=~ /^(.*)\/[^\/]+\.dbf$/i;104 my ($parent_dir) = $filename_full_path =~ /^(.*)\/[^\/]+\.dbf$/i; 105 105 106 106 # open the file 107 if (!open (FOXBASEIN, $f ullname)) {107 if (!open (FOXBASEIN, $filename_full_path)) { 108 108 if ($gli) { 109 print STDERR "<ProcessingError n='$file' r='Could not read $f ullname'>\n";110 } 111 print STDERR "FOXPlugin::read - couldn't read $f ullname\n";109 print STDERR "<ProcessingError n='$file' r='Could not read $filename_full_path'>\n"; 110 } 111 print STDERR "FOXPlugin::read - couldn't read $filename_full_path\n"; 112 112 return -1; # error in processing 113 113 } … … 141 141 print STDERR "<ProcessingError n='$file' r='Does not seem to be a Foxbase file'>\n"; 142 142 } 143 print STDERR "FOXPlugin:read - $f ullnamedoesn't seem to be a Foxbase file\n";143 print STDERR "FOXPlugin:read - $filename_full_path doesn't seem to be a Foxbase file\n"; 144 144 return -1; 145 145 } … … 163 163 164 164 # open the dbt file if we need to 165 my $dbtfullname = $f ullname;166 if ($f ullname=~ /f$/) {165 my $dbtfullname = $filename_full_path; 166 if ($filename_full_path =~ /f$/) { 167 167 $dbtfullname =~ s/f$/t/; 168 168 } else {
Note:
See TracChangeset
for help on using the changeset viewer.