fsspec / universal_pathlib

pathlib api extended to use fsspec backends
MIT License
240 stars 41 forks source link

S3Path Relative_to returns itself #184

Open AlexBondViv opened 7 months ago

AlexBondViv commented 7 months ago

In 0.1.4 S3Path.relative_to would return a path relative to another path

i.e: UPath("s3://bucket/delta/db/table").relative_to(UPath("s3://bucket/delta/")) == UPath("s3://bucket/db/table")

However in 0.2.0 it seems that relative_to() simply returns itself as UPath("s3://bucket/delta/db/table").relative_to(UPath("s3://bucket/delta/")) returns UPath("s3://bucket/delta/db/table").

AlexBondViv commented 7 months ago

I will note that this is still not a relative path as the bucket probably shouldn't be returned either, this is in itself another issue but is already reported in #170

mmlakera commented 1 month ago

Same issue here.