This project has moved and is read-only. For the latest updates, please go here.
1

Closed

Two path can not match even if they are equal

description

Path path1 = "c:\foo\bar\baz.dll";
Path path2 = "c:\foo\bar";
path1.Parent.Equals(path2) should return true, but it tests strings which are

"c:\foo\bar\" and "c:\foo\bar"

The workaround is to call

path1.Parent.DirectoryName.Equals(path2.DirectoryName)
Closed Jul 1, 2013 at 6:18 AM by BertrandLeRoy
Couldn't reproduce that on the latest code, but added some test cases to verify it.

comments