1
0
mirror of https://github.com/golang/go synced 2024-11-18 20:04:52 -07:00

net/http/cgi: correctly handle pathnames for cygwin perl on windows

Cygwin perl uses unix pathnames in windows. Include cygwin perl in the
list of special cases for unix pathname handling in test.cgi.

Change-Id: I30445a9cc79d62d022ecc232c35aa5015b7418dc
Reviewed-on: https://go-review.googlesource.com/2973
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
This commit is contained in:
Martin Möhrmann 2015-01-17 13:37:04 +01:00 committed by Alex Brainman
parent c3b459d328
commit c2c0bf77ef

View File

@ -45,7 +45,7 @@ foreach my $k (sort keys %ENV) {
# NOTE: msys perl returns /c/go/src/... not C:\go\....
my $dir = getcwd();
if ($^O eq 'MSWin32' || $^O eq 'msys') {
if ($^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin') {
if ($dir =~ /^.:/) {
$dir =~ s!/!\\!g;
} else {