Changeset 19742

Show
Ignore:
Timestamp:
04.06.2009 19:04:58 (10 years ago)
Author:
ak19
Message:

Dr Bainbridge fixed a little problem about how the document_prefix option for exploding an ISIS database got resolved: it now makes sure there's a proper fileseparator at the end of the doc_prefix even if the user had not provided one.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/bin/script/explode_metadata_database.pl

    r19626 r19742  
    402402 
    403403        $value =~ s/\\\\/\\/g; 
    404          
     404 
    405405        # Does this metadata element specify a document to obtain? 
    406406        if ($field eq $document_field) { 
    407         my $document_file_full = $document_prefix . $value . $document_suffix; 
     407        # if the document prefix provided didn't have the requisite slash at the end, we make sure it does now 
     408        # by first of all stripping any trailing slash and then always ensuring one is used through filename_cat 
     409        $document_prefix =~ s/(\/|\\)$//; 
     410        my $document_file_full = &util::filename_cat($document_prefix, "$value$document_suffix"); 
    408411 
    409412        # this either downloads/copies the document, or creates a nul file for it.