- Timestamp:
- 2012-01-24T16:19:58+13:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm
r24951 r24971 328 328 if ($element eq "FileSet") { 329 329 foreach my $target (@{$self->{'saved_targets'}}) { 330 331 # Indexing into the extrameta data structures requires the filename's style of slashes to be in URL 332 # format. But if metadata.xml was user-constructed, its FileName fields (stored in the saved_targets 333 # map) could represent pathnames in Windows format using \ as file separator, instead of pathnames 334 # being in URL format as Greenstone would've generated. Need to convert such filepaths to URL style 335 # paths. Then need convert this to a regex to protect special characters like brackets in the 336 # filepath, such as "C:\Program Files (x86)\Greenstone". 337 338 $target = &util::unregex_filename($target); # filename is a regex, before converting it to URL form, unregex it 339 $target = &util::filepath_to_url_format($target); # convert to URL form 340 $target = &util::filename_to_regex($target); # regex it. Now we have regexed URL form of filename 341 330 342 my $file_metadata = &extrametautil::getmetadata($self->{'metadataref'}, $target); 331 343 my $saved_metadata = $self->{'saved_metadata'};
Note:
See TracChangeset
for help on using the changeset viewer.