Subject: | Win32 abs2rel fails on UNC & volume root directories |
abs2rel() under Win32 gives incorrect results for UNC paths and any comparison in which the base path is the root of a volume. Examples:
use File::Spec::Functions 'abs2rel';
print abs2rel("C:\\Windows\\System32", "C:\\"), "\n";
# yields '..\Windows\System32' instead of the expected 'Windows\System32'
print abs2rel("\\\\computer2\\share3\\foo.txt", "\\\\computer2\\share3")
# yields '\foo.txt' rather than the expected 'foo.txt'
This has been tested with PathTools 3.14 on the following perl:
This is perl, v5.8.4 built for MSWin32-x86-multi-thread
(with 3 registered patches, see perl -V for more detail)
Copyright 1987-2004, Larry Wall
Binary build 810 provided by ActiveState Corp. http://www.ActiveState.com
ActiveState is a division of Sophos.
Built Jun 1 2004 11:52:21