Changeset 28225

Show
Ignore:
Timestamp:
05.09.2013 16:30:23 (6 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

Files:
1 modified

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