mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-11 07:18:28 +01:00
gs: make it work with empty dir
This commit is contained in:
@@ -148,8 +148,16 @@ class RemoteGS(RemoteBASE):
|
||||
|
||||
def walk_files(self, path_info):
|
||||
for fname in self._list_paths(path_info.bucket, path_info.path):
|
||||
# skip nested empty directories
|
||||
if fname.endswith("/"):
|
||||
continue
|
||||
yield path_info.replace(fname)
|
||||
|
||||
def makedirs(self, path_info):
|
||||
self.gs.bucket(path_info.bucket).blob(
|
||||
(path_info / "").path
|
||||
).upload_from_string("")
|
||||
|
||||
def isdir(self, path_info):
|
||||
dir_path = path_info / ""
|
||||
return bool(
|
||||
|
||||
@@ -83,6 +83,7 @@ def remote_gs():
|
||||
put_object("data/subdir/1", "1")
|
||||
put_object("data/subdir/2", "2")
|
||||
put_object("data/subdir/3", "3")
|
||||
put_object("data/subdir/4/", "")
|
||||
|
||||
yield remote
|
||||
|
||||
|
||||
Reference in New Issue
Block a user