Changeset 28225


Ignore:
Timestamp:
2013-09-05T16:30:23+12:00 (11 years ago)
Author:
ak19
Message:

Another commit concerning the placeholder GS paths written into the archiveinf db files. On Windows, DOS style filenames (short file names) should be converted to long file paths in order to be able to find a match with prefixes to be replaced with standard GS placeholder prefixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/util.pm

    r28213 r28225  
    4242use FileUtils;
    4343
     44if ($^O =~ m/mswin/i) {
     45    require Win32; # for working out Windows Long Filenames from Win 8.3 short filenames
     46}
     47
    4448# removes files (but not directories)
    4549sub rm {
     
    12951299
    12961300    return $path unless is_abs_path_any_os($path); # path is relative
    1297    
     1301   
     1302    if ($^O =~ m/mswin/i) {
     1303        $path = &Win32::GetLongPathName($path);
     1304    }   
     1305   
    12981306    # now we know we're dealing with absolute paths and have to replace gs prefixes with placeholders
    12991307    my @gs_paths = ($ENV{'GSDLCOLLECTDIR'}, $ENV{'GSDLCOLLECTHOME'}, $ENV{'SITEHOME'}, $ENV{'GREENSTONEHOME'}); # list in this order: from longest to shortest path
Note: See TracChangeset for help on using the changeset viewer.