Skip to content

Commit

Permalink
[WIP]: taking care of the corner case folder created from S3
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabu George committed Feb 2, 2022
1 parent 8c01a51 commit 9c11c6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cloudpathlib/s3/s3client.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ def _list_dir(self, cloud_path: S3Path, recursive=False) -> Iterable[S3Path]:

# files in the directory
for result_key in result.get("Contents", []):
yield self.CloudPath(f"s3://{cloud_path.bucket}/{result_key.get('Key')}")
if result_key.get('Size') > 0:
yield self.CloudPath(f"s3://{cloud_path.bucket}/{result_key.get('Key')}")

def _move_file(self, src: S3Path, dst: S3Path, remove_src: bool = True) -> S3Path:
# just a touch, so "REPLACE" metadata
Expand Down

0 comments on commit 9c11c6a

Please sign in to comment.