Jerry D. Hedden [Thu, 6 Sep 2007 13:07:51 +0000 (09:07 -0400)]
From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-ID: <
1ff86f510709061007x57e86b50led110861846cdc02@mail.gmail.com>
p4raw-id: //depot/perl@31808
# cwd() on Cygwin returns a mapped path that we need to translate
# back to a Windows path. Invoking `cygpath` on $subdir doesn't work.
if ($^O eq "cygwin") {
- chomp(my $cygpath = `cygpath -w "$cwd"`);
- $subdir =~ s,\Q$cwd\E,$cygpath,;
+ $subdir = Cygwin::posix_to_win_path($subdir, 1);
}
$subdir =~ s,/,\\,g;
ok(Win32::GetLongPathName($subdir), $long);