From d7692ebc101512ee45d8f37166a851681722cf0d Mon Sep 17 00:00:00 2001 From: Matthew Wardrop Date: Fri, 26 Jan 2018 09:00:03 -0800 Subject: [PATCH] Fix downloads when destination is not explicitly set. --- omniduct/filesystems/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/omniduct/filesystems/base.py b/omniduct/filesystems/base.py index e24195a..a2dd6ee 100644 --- a/omniduct/filesystems/base.py +++ b/omniduct/filesystems/base.py @@ -349,11 +349,13 @@ def download(self, source, dest=None, overwrite=False, fs=None): file/folder `source` should be downloaded. If not specified, defaults to the local filesystem. """ - source = self._path(source) if fs is None: from .local import LocalFsClient fs = LocalFsClient() + source = self._path(source) + dest = fs._path(dest) + if dest.endswith(fs.path_separator): assert fs.isdir(dest), "No such directory `{}`".format(dest) if not source.endswith(self.path_separator):