Skip to content

Make path::filename not return root directory #194

@Lastique

Description

@Lastique

This was originally reported in #88.

Unlike C++17 std::filesystem, path::filename returns root directory, if the path ends with the root directory. For example, path("/").filename() == "/", while C++17 mandates an empty filename in this case.

It is not clear why this was made this way, but it makes sense to change this behavior to make it closer to std::filesystem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions