- Timestamp:
- 2010-12-09T00:10:10+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm
r23212 r23419 214 214 my $self = shift (@_); 215 215 my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $gli) = @_; 216 216 217 217 my $filename_full_path = &util::filename_cat($base_dir, $file); 218 218 return undef unless $self->can_process_this_file($filename_full_path); 219 219 220 $block_hash->{'metadata_files'}->{$filename_full_path} = 1; 220 if ($ENV{'GSDLOS'} =~ m/^windows$/) { 221 222 my $lower_drive = $filename_full_path; 223 $lower_drive =~ s/^([A-Z]):/\l$1:/i; 224 225 my $upper_drive = $filename_full_path; 226 $upper_drive =~ s/^([A-Z]):/\u$1:/i; 227 228 $block_hash->{'metadata_files'}->{$lower_drive} = 1; 229 $block_hash->{'metadata_files'}->{$upper_drive} = 1; 230 } 231 else { 232 $block_hash->{'metadata_files'}->{$filename_full_path} = 1; 233 } 221 234 222 235 return 1; … … 235 248 $self->{'metadata-file'} = $file; 236 249 $self->{'metadata-filename'} = $filename; 237 250 238 251 my $outhandle = $self->{'outhandle'}; 239 252 … … 241 254 print $outhandle "MetadataXMLPlugin: processing $file\n" if ($self->{'verbosity'})> 1; 242 255 # add the file to the block list so that it won't be processed in read, as we will do all we can with it here 243 $ block_hash->{'file_blocks'}->{$filename} = 1;256 $self->block_filename($block_hash,$filename); 244 257 245 258 $self->{'metadataref'} = $extrametadata;
Note:
See TracChangeset
for help on using the changeset viewer.