Skip to content

Cloudpathlib does not automatically resolve paths that contain .. #494

@lejmr

Description

@lejmr

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.

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()) == []

Metadata

Metadata

Assignees

No one assigned

    Labels

    design decisionIssues that are waiting on making a final decision about the design of the API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions