Changeset 28393
- Timestamp:
- 2013-10-14T09:57:33+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/FileUtils.pm
r27762 r28393 495 495 496 496 # remove duplicate slashes and remove the last slash 497 if ( $ENV{'GSDLOS'} =~ /^windows$/i)497 if (($ENV{'GSDLOS'} =~ /^windows$/i) && ($^O ne "cygwin")) 498 498 { 499 499 $filename =~ s/[\\\/]+/\\/g; … … 509 509 } 510 510 ## filenameConcatenate() 511 512 513 514 ## @function javaFilenameConcatenate() 515 # 516 # Same as filenameConcatenate(), except because on Cygwin 517 # the java we run is still Windows native, then this means 518 # we want the generate filename to be in native Windows format 519 sub javaFilenameConcatenate 520 { 521 my (@filenames) = @_; 522 523 my $filename_cat = filenameConcatenate(@filenames); 524 525 if ($^O eq "cygwin") { 526 # java program, using a binary that is native to Windows, so need 527 # Windows directory and path separators 528 529 $filename_cat = `cygpath -wp "$filename_cat"`; 530 chomp($filename_cat); 531 $filename_cat =~ s%\\%\\\\%g; 532 } 533 534 return $filename_cat; 535 } 536 ## javaFilenameConcatenate() 537 511 538 512 539 ## @function filePutContents() … … 553 580 my $exists = 0; 554 581 555 if ( $ENV{'GSDLOS'} =~ m/^windows$/i)582 if (($ENV{'GSDLOS'} =~ m/^windows$/i) && ($^O ne "cygwin")) 556 583 { 557 584 require Win32; … … 652 679 { 653 680 my ($filename) = @_; 654 if ( $ENV{'GSDLOS'} =~ /^windows$/i)681 if (($ENV{'GSDLOS'} =~ /^windows$/i) && ($^O ne "cygwin")) 655 682 { 656 683 return ($filename =~ m/^(\w:)?\\/); … … 1137 1164 } 1138 1165 1139 if ( $ENV{'GSDLOS'} =~ /^windows$/i)1166 if (($ENV{'GSDLOS'} =~ /^windows$/i) && ($^O ne "cygwin")) 1140 1167 { 1141 1168 # symlink not supported on windows
Note:
See TracChangeset
for help on using the changeset viewer.