Skip to content

Commit

Permalink
remote: fix remaining gdrive build issues (iterative#3959)
Browse files Browse the repository at this point in the history
* tests: fix gdrive build

* remote.gdrive: fix walk_files prefix relpath
  • Loading branch information
pmrowla authored Jun 5, 2020
1 parent 803bb3e commit b57077a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions dvc/remote/gdrive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/remotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit b57077a

Please sign in to comment.