diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 869a88d02..56a771e7b 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -8,6 +8,8 @@ ### Bug Fixes +* Fix the bug where the SDK would fail to properly recursively traverse directories in the _VolumesPath.list function + ### Documentation ### Internal Changes diff --git a/databricks/sdk/mixins/files.py b/databricks/sdk/mixins/files.py index 2cdaf3532..40514099e 100644 --- a/databricks/sdk/mixins/files.py +++ b/databricks/sdk/mixins/files.py @@ -487,7 +487,7 @@ def list(self, *, recursive=False) -> Generator[files.FileInfo, None, None]: next_path = queue.popleft() for file in self._api.list_directory_contents(next_path.as_string): if recursive and file.is_directory: - queue.append(self.child(file.name)) + queue.append(_VolumesPath(self._api, file.path)) if not recursive or not file.is_directory: yield files.FileInfo( path=file.path,