Changeset 23416

Show
Ignore:
Timestamp:
08.12.2010 11:45:11 (9 years ago)
Author:
davidb
Message:

More careful handling of filenames going into 'block' hash. On Windows want to make sure we are consistently dealing with either C: or c: filenames

Files:
1 modified

Legend:

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

    r23414 r23416  
    11011101    # Ensure any DOS-like filename, such as test~1.txt, has been upgraded 
    11021102    # to its long (Windows) version 
    1103     $filename_full_path = Win32::GetLongPathName($filename_full_path); 
     1103    my $long_filename = Win32::GetLongPathName($filename_full_path); 
     1104    if (defined $long_filename) { 
     1105        $filename_full_path = $long_filename; 
     1106    } 
    11041107    # Make sure initial drive letter is lower-case (to fit in with rest of Greenstone) 
    11051108    $filename_full_path =~ s/^(.)/\l$1/; 
     
    11261129    if (defined $short_filename) { 
    11271130        $filename_full_path = $short_filename; 
    1128  
    1129         # Make sure initial drive letter is lower-case (to fit in 
    1130         # with rest of Greenstone) 
    1131         $filename_full_path =~ s/^(.)/\l$1/; 
    1132     } 
     1131    } 
     1132    # Make sure initial drive letter is lower-case (to fit in 
     1133    # with rest of Greenstone) 
     1134    $filename_full_path =~ s/^(.)/\l$1/; 
    11331135    } 
    11341136