Skip to content

Commit

Permalink
update variable
Browse files Browse the repository at this point in the history
  • Loading branch information
msmitherdc authored Aug 29, 2024
1 parent 19a52c3 commit 3de9f86
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cloudpathlib/s3/s3client.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def __init__(

def _get_metadata(self, cloud_path: S3Path) -> Dict[str, Any]:
# get accepts all download extra args
results = None
size = None
path = f"s3://{cloud_path.bucket}/{cloud_path.key}"
size = self._metadata_cache[cloud_path].size
if size:
Expand Down Expand Up @@ -313,9 +313,10 @@ def _list_dir(self, cloud_path: S3Path, recursive=False) -> Iterable[Tuple[S3Pat

# yield object as file
else:
path = self.CloudPath(f"s3://{cloud_path.bucket}/{result_key.get('Key')}")
self._set_metadata_cache(path, "file", etag, size, last_modified)
yield (
self.CloudPath(f"s3://{cloud_path.bucket}/{result_key.get('Key')}"),
path,
False,
)

Expand Down

0 comments on commit 3de9f86

Please sign in to comment.