Skip to content

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

@RedQueen87

Description

@RedQueen87

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions