Skip to content

Commit 1f9a0f0

Browse files
author
Mr. Outis
committed
address @efiop's suggestions
1 parent 845cd35 commit 1f9a0f0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dvc/remote/s3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,11 @@ def exists(self, path_info):
213213
return path_info.path == fname or fname.startswith(dir_path.path)
214214

215215
def makedirs(self, path_info):
216-
# We need to support creating empty directories, on S3, that means
216+
# We need to support creating empty directories, which means
217217
# creating an object with an empty body and a trailing slash `/`.
218218
#
219219
# We are not creating directory objects for every parent prefix,
220-
# it doesn't make sense.
220+
# as it is not required.
221221
dir_path = path_info / ""
222222
self.s3.put_object(Bucket=path_info.bucket, Key=dir_path.path, Body="")
223223

tests/unit/remote/test_s3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ def test_copy_preserve_etag_across_buckets(remote):
103103
assert from_etag == to_etag
104104

105105

106-
def makedirs(remote):
107-
empty_dir = remote.path_info / "empty_dir"
106+
def test_makedirs(remote):
107+
empty_dir = remote.path_info / "empty_dir" / ""
108108
remote.remove(empty_dir)
109109
assert not remote.exists(empty_dir)
110110
remote.makedirs(empty_dir)

0 commit comments

Comments
 (0)