drivendataorg / drivendataorg/cloudpathlib

Cloudpathlib does not automatically resolve paths that contain `..`

Open
#494 2 comments 0 reactions 0 assignees View on GitHub
design decision
Dominant language
Python
Stars
628
Forks
88
Avg merge
17h 28m
Merged PRs (30d)
2

Description

When `..` are in the path, the AzureBlobPath fails to list directory with

```
azure.core.exceptions.ResourceNotFoundError: The specified path does not exist.
```

Interestingly, the metadata to identify whether a path exists, is dir, etc., works just fine.

In my opinion, this should work since `pathlib.Path` works this way.

```python
from pathlib import Path
# Create directroy
Path("root/test/test2").mkdir(parents=True, exist_ok=True)
p = Path("root/test/test2")
assert (p.exists(), p.is_dir()) == (True, True)
assert list(p.iterdir()) == []
p = Path("root/test/../test/test2")
assert (p.exists(), p.is_dir()) == (True, True)
assert list(p.iterdir()) == []
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.