fsspec / universal_pathlib

pathlib api extended to use fsspec backends
MIT License
251 stars 44 forks source link

`mkdir(parents=True`) tries to create the bucket if it's empty #111

Closed danielgafni closed 2 months ago

danielgafni commented 1 year ago

I run into this issue today... I was using UPath("gs://my-fresh-bucket/some-dir/another-dir/file").parent.mkdir(parents=True, exist_ok=True). The bucket was empty and didn't contain any objects. universal-pathlib attempted to create the bucket instead of creating the directory structure, which caused the code to fail.

ap-- commented 1 year ago

Thanks for reporting!

I'll add this as a test, and will work on a fix soon.

ap-- commented 1 year ago

Hey @danielgafni

Could you please try to reproduce this bug and provide the output of pip freeze and a code sample?

I was trying to reproduce it, but can't.

danielgafni commented 1 year ago

Hey, sure, I'll try to do it.