Sometimes cygpath has been observed to return a path with a trailing
slash. That can cause problems, Also, make "cygpath" usage
consistent with "pwd -W" with respect to the use of forward slashes.
Backpatch to release 14 where the current code was introduced.
exist, but its parent or grandparent directory must exist unless cygpath is
available.
+The returned path uses forward slashes but has no trailing slash.
+
=cut
sub perl2host
if ($is_msys2)
{
# get absolute, windows type path
- my $path = qx{cygpath -a -w "$subject"};
+ my $path = qx{cygpath -a -m "$subject"};
if (!$?)
{
chomp $path;
+ $path =~ s!/$!!;
return $path if $path;
}
# fall through if this didn't work.
# this odd way of calling 'pwd -W' is the only way that seems to work.
my $dir = qx{sh -c "pwd -W"};
chomp $dir;
+ $dir =~ s!/$!!;
chdir $here;
return $dir . $leaf;
}