Changeset 28381

Show
Ignore:
Timestamp:
10.10.2013 14:39:22 (6 years ago)
Author:
ak19
Message:

Bugfix. When dealing with filenames with special characters that are converted to URL encoding, on Windows ConvertBinaryFile? wasn't looking for the new filename but the original one. It needs to be looking for the new filename. Problem noticed with a ppt file sent in to the mailing list.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/ConvertBinaryFile.pm

    r27509 r28381  
    258258    my $tmp_filename = &FileUtils::filenameConcatenate($tmp_dirname, "$utf8_tailname$lc_suffix"); 
    259259     
    260     # If gsdl is remote, we're given relative path to input file, of the form import/tailname.suffix 
     260    # If gsdl is remote, we're given relative path to input file, of the form import/utf8_tailname.suffix 
    261261    # But we can't softlink to relative paths. Therefore, we need to ensure that 
    262262    # the input_filename is the absolute path, see http://perldoc.perl.org/File/Spec.html 
     
    327327    # running under windows 
    328328    if ($ENV{'GSDLOS'} =~ /^windows$/i) { 
    329         $output_filename = $tmp_dirname . "\\$tailname\\" . $tailname . ".$output_type"; 
     329        $output_filename = $tmp_dirname . "\\$utf8_tailname\\" . $utf8_tailname . ".$output_type"; 
    330330    } else { 
    331         $output_filename = $tmp_dirname . "\/$tailname\/" . $tailname . ".$output_type"; 
     331        $output_filename = $tmp_dirname . "\/$utf8_tailname\/" . $utf8_tailname . ".$output_type"; 
    332332    } 
    333333    } else {