bu in Path.Relativize
forax at univ-mlv.fr
Wed Feb 10 08:44:03 PST 2010
Le 10/02/2010 17:39, Alan Bateman a écrit :
> Rémi Forax wrote:
>> It seems that relativize doesn't understand well the concept of
>> current directory (".").
>> Path path1 = Paths.get("foo.txt");
>> Path path2 = Paths.get(".");
>> Path relativize = path2.relativize(path1);
>> System.out.println(relativize); // print ../foo.txt
>> I use jdk7 b81 under linux,
> You're right - I'll create a bug for this now. Thanks Rémi!
Thank you, Alan,
a workaround is to used realPath() on both paths before calling relativize.
More information about the nio-dev