Skip to content

UPath("/", protocol="memory").is_absolute() == False #494

@cscutcher

Description

@cscutcher

I can kinda see why this is happening in the code, but can't tell if it's intentional.

Naively, I'd expect UPath("/", protocol="memory") to be an absolute path. Especially since UPath("/foo", protocol="memory") is an absolute path, and UPath("/foo", protocol="memory").parent == UPath("/", protocol="memory").

I'd guess this is a bug, but wasn't sure if this was a side-effect of trying to generalise everything consistently, especially with regard to the memory filesystem.

Similarly, UPath(".").name == "" which makes sense to me, but UPath(".", protocol="memory").name == '.' . Was this an intentional decision or is it a bug?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions