Skip to content

Commit

Permalink
Fix downloads when destination is not explicitly set.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Wardrop committed Jan 26, 2018
1 parent 24b2ec1 commit d7692eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion omniduct/filesystems/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit d7692eb

Please sign in to comment.