Changeset 27012 for main/trunk


Ignore:
Timestamp:
2013-03-05T18:58:46+13:00 (11 years ago)
Author:
ak19
Message:

As John Rose requested: when you build an oai collection with the Create panel's Import Options' OIDType set to assigned and its associated OAImetadata field set to ex.File.FileName and build the collection, a client can then use OAIDownload to Get Documents from this collection over OAI that have similarly readable filenames, with an additional number suffixed to the filenames. John Rose requested that the first file of such a name not have the hyphen 1 (-1) suffixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/downloaders/OAIDownload.pm

    r25224 r27012  
    392392
    393393        my $download_doc_filename = $oai_rec_filename;
    394         my $new_extension = "\-$count\.$id_file_ext";
     394        # As requested by John Rose, don't suffix -$count for the very first document (so no "-1" suffix):
     395        my $new_extension = ($count > 1) ? "\-$count\.$id_file_ext" : "\.$id_file_ext";
    395396        $count++;
    396397        #$download_doc_filename =~ s/\.oai$/\.$id_file_ext/;
Note: See TracChangeset for help on using the changeset viewer.