Subject: | abs_path() returning C:/foo/bar on Win32 |
abs_path returns paths using / instead of \ on Win32. C:/foo/bar instead of C:\foo\bar. I've confirmed this with Cwd 2.17 and the code appears in 3.06.
my $tdir = $dir;
$tdir =~ s!\\!/!g if $^O eq 'MSWin32';
return $tdir eq File::Spec->rootdir
? File::Spec->catpath($vol, $dir, $file)
: fast_abs_path(File::Spec->catpath($vol, $dir, '')) . '/' . $file;
Why it does this I don't know, its probably a pre-5.005 Unixism never fixed possibly related to the fact that rootdir() on Win32 returns /. Cwd has no policy on what style of path it will output but I would assume it would be native.