diff --git a/HISTORY.md b/HISTORY.md index b39bee8c..9af019e2 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,6 +3,7 @@ ## Unreleased - Fixed `CloudPath(...) / other` to correctly attempt to fall back on `other`'s `__rtruediv__` implementation, in order to support classes that explicitly support the `/` with a `CloudPath` instance. Previously, this would always raise a `TypeError` if `other` were not a `str` or `PurePosixPath`. (PR [#479](https://github.com/drivendataorg/cloudpathlib/pull/479)) +- Fixed `AzureBlobPath(...).blob` to correctly resolves path to the blob for situations when specified path contains `..`. ## v0.20.0 (2024-10-18) diff --git a/cloudpathlib/azure/azblobpath.py b/cloudpathlib/azure/azblobpath.py index 4f8df0c9..43d7d778 100644 --- a/cloudpathlib/azure/azblobpath.py +++ b/cloudpathlib/azure/azblobpath.py @@ -96,7 +96,11 @@ def container(self) -> str: @property def blob(self) -> str: - key = self._no_prefix_no_drive + key = ( + Path(self._no_prefix_no_drive).resolve().as_posix() + if self._no_prefix_no_drive + else self._no_prefix_no_drive + ) # key should never have starting slash for if key.startswith("/"):