Changeset 19754
- Timestamp:
- 2009-06-08T13:34:05+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/bin/script/explode_metadata_database.pl
r19747 r19754 402 402 403 403 $value =~ s/\\\\/\\/g; 404 my $document_file_full; 404 405 405 406 # Does this metadata element specify a document to obtain? 406 407 if ($field eq $document_field) { 407 # shouldn't force a slash at the end after all, since the doc prefix may already 408 # contain the prefix of the actual filename itself (that's shared over several docs) 409 my $document_file_full = $document_prefix . $value . $document_suffix; 408 if(-d $document_prefix && $document_prefix !~ m@^(http|ftp|https)://@ ) { 409 # if the document-prefix refers to a directory but not URL, ensure it has a file-separator at the end 410 # by first of all stripping any trailing slash and then always ensuring one is used through filename_cat 411 $document_prefix =~ s/(\/|\\)$//; 412 $document_file_full = &util::filename_cat($document_prefix, "$value$document_suffix"); 413 } else { # the doc prefix may also contain the prefix of the actual *filename* following the directory 414 $document_file_full = $document_prefix . $value . $document_suffix; 415 } 410 416 411 417 # this either downloads/copies the document, or creates a nul file for it.
Note:
See TracChangeset
for help on using the changeset viewer.