From affa058b2ce17a3a071266711cf2c699bddb1583 Mon Sep 17 00:00:00 2001 From: Peter Rowlands Date: Fri, 5 Jun 2020 13:49:21 +0900 Subject: [PATCH 1/2] tests: fix gdrive build --- tests/remotes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/remotes.py b/tests/remotes.py index 1a3c66b334..a5ce43a30a 100644 --- a/tests/remotes.py +++ b/tests/remotes.py @@ -150,7 +150,7 @@ def create_dir(dvc, url): "gdrive_use_service_account": True, } remote = GDriveRemote(dvc, config) - remote._gdrive_create_dir("root", remote.path_info.path) + remote.tree._gdrive_create_dir("root", remote.path_info.path) @staticmethod def get_url(): From 6111ffeb381cfdbae2d895bd2ae1dd213a5abff2 Mon Sep 17 00:00:00 2001 From: Peter Rowlands Date: Fri, 5 Jun 2020 13:49:45 +0900 Subject: [PATCH 2/2] remote.gdrive: fix walk_files prefix relpath --- dvc/remote/gdrive.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dvc/remote/gdrive.py b/dvc/remote/gdrive.py index 8983e761c2..0204a8997e 100644 --- a/dvc/remote/gdrive.py +++ b/dvc/remote/gdrive.py @@ -537,8 +537,9 @@ def walk_files(self, path_info, **kwargs): if path_info == self.path_info: prefix = None else: - prefix = path_info.relative_to(self.path_info).path - return self._list_paths(prefix=prefix, **kwargs) + prefix = path_info.path + for fname in self._list_paths(prefix=prefix, **kwargs): + yield path_info.replace(fname) def remove(self, path_info): item_id = self._get_item_id(path_info)