FluentPath icon indicating copy to clipboard operation
FluentPath copied to clipboard

PathBase<T>.Up(1) has bug?

Open RedQueen87 opened this issue 1 year ago • 0 comments

It looks like there is small bug or feature in this method. When the path is directory ends with '' character then .Up(1) just remove this character. And I think that the purpose of this method is to do the same what "../" does in CMD.

var example1 = Fluent.IO.Path.Get("C:\\aaa\\bbb\\").Up(1).FullPath;
var example2 = Fluent.IO.Path.Get("C:\\aaa\\bbb").Up(1).FullPath;
Debug.Assert(example1 == example2);

In my opinion: "C:\aaa\bbb\" and "C:\aaa\bbb" are not the same string but are the same path.

RedQueen87 avatar Sep 03 '24 14:09 RedQueen87