Closed michael-bily closed 7 months ago
Fixed in universal_pathlib>=0.2.0
>>> from upath import UPath
>>> a = UPath("s3://sf-crypto-integration-tests/aupxqnx2/")
>>> a / "hello.txt"
S3Path('s3://sf-crypto-integration-tests/aupxqnx2/hello.txt')
>>> b = UPath("s3://sf-crypto-integration-tests/aupxqnx2")
>>> b / "hello.txt"
S3Path('s3://sf-crypto-integration-tests/aupxqnx2/hello.txt')
Hey,
I found a surprising behavior
In [1]: from upath import UPath
In [2]: a = UPath("s3://sf-crypto-integration-tests/aupxqnx2/")
In [3]: a = UPath("s3://bucket/folder/")
In [4]: a / "hello.txt" Out[4]: S3Path('s3://bucket/folder//hello.txt')
I'd expect S3Path('s3://bucket/folder/hello.txt') - without the extra /
I see that PosixUPath trims the
/
already during instantiation.Thank you for looking into this.