Changeset 17294


Ignore:
Timestamp:
2008-09-17T06:20:47+12:00 (16 years ago)
Author:
kjdon
Message:

added a fix for a bug John T discovered where in get_new_doc_dir you can come out of the while loop and still have a directory name that already exists (because you have run out of doc_dir_rest). This occurs if you have OIDs that are prefixes of other ones and the longer ones get processed first.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugouts/BasePlugout.pm

    r17202 r17294  
    565565        ((-d &util::filename_cat ($working_dir, "$doc_dir.dir")) ||
    566566         ($working_info->size() >= 1024 && $doc_dir_num < 2)));
    567    
     567   my $i = 1;
     568   my $doc_dir_base = $doc_dir;
     569   while (-d &util::filename_cat ($working_dir, "$doc_dir.dir")) {
     570       $doc_dir = "$doc_dir_base-$i";
     571       $i++;
     572   }
     573         
    568574   return "$doc_dir.dir";
    569575}
Note: See TracChangeset for help on using the changeset viewer.