Changeset 9241


Ignore:
Timestamp:
2005-03-01T22:34:08+13:00 (19 years ago)
Author:
davidb
Message:

Incorrect parsing of gsdlassocfile in METS code. Can have a directory
after final ":" but code had assumed this would be empty. Now fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/doc.pm

    r9038 r9241  
    345345       
    346346       if ($data->[0] eq "gsdlassocfile"){
    347       $escaped_value =~ m/^(.*?):(.*):$/;
    348 
    349       my $assfilePath = $dirPath . '/'. $1;
     347
     348       $escaped_value =~ m/^(.*?):(.*):(.*)$/;
     349       my $assoc_file = $1;
     350       my $mime_type  = $2;
     351       my $assoc_dir  = $3;
     352
     353      my $assfilePath = $dirPath . '/'. $assoc_file;
    350354          ++$fileID;
    351355
    352       $all_text .= '    <mets:file MIMETYPE="'.$2.'" ID="default.'.$fileID. '">'. "\n";
     356      $all_text .= '    <mets:file MIMETYPE="'.$mime_type.'" ID="default.'.$fileID. '">'. "\n";
    353357      $all_text .= '      <mets:FLocat LOCTYPE="URL" xlink:href="file:'.$assfilePath.'" />'."\n";
    354358         
     
    10961100        push (@metadata, $data->[1]) if ($data_name eq $field);
    10971101    }
    1098        
     1102
    10991103    return \@metadata;
    11001104}
Note: See TracChangeset for help on using the changeset viewer.