Ignore:
Timestamp:
2013-10-10T13:57:59+13:00 (11 years ago)
Author:
davidb
Message:

A set of changes to help Greenstone building code (perl) run under Cygwin. The test is designed to be mutually to when run natively on Windows. In effect the refined test is saying: if you're windows but not cygwin then do as you used to do for Windows, otherwise go with Unix (as Cygwin is effectively giving you a Unix like operating system to run in)

File:
1 edited

Legend:

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

    r27973 r28375  
    671671    print $outhandle "Calling method: $cfilename:$cline $cpackage->$csubr\n";
    672672
    673 
    674673    my ($filemeta) = $file =~ /([^\\\/]+)$/; # getting the tail of the filepath (skips all string parts containing slashes upto the end)
    675674    $filemeta = $self->filepath_to_utf8($filemeta, $file_encoding);
     
    891890    # Win32::GetLongFilePath() -- then the underlying file system is UTF16
    892891
    893     if ($ENV{'GSDLOS'} =~ m/^windows$/i) {
     892    if (($ENV{'GSDLOS'} =~ m/^windows$/i) && ($^O ne "cygwin")) {
    894893        # Can do better than working with the DOS character encoding returned by locale     
    895894        $deduced_filename_encoding = "unicode";
     
    963962    # abbreviated DOS form
    964963
    965     if ($ENV{'GSDLOS'} =~ m/^windows$/i) {
     964    if (($ENV{'GSDLOS'} =~ m/^windows$/i) && ($^O ne "cygwin")) {
    966965    if ((defined $filename_encoding) && ($filename_encoding eq "unicode")) {
    967966        if (-e $raw_filename) {
Note: See TracChangeset for help on using the changeset viewer.