Merge pull request #144 from brainmorsel/dev-2.x

Fix #143: Imposible to download file into directory
This commit is contained in:
Alex Root Junior 2019-06-26 22:38:33 +03:00 committed by GitHub
commit dc530a5833
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,7 @@ class Downloadable:
if destination is None:
destination = file.file_path
elif isinstance(destination, (str, pathlib.Path)) and os.path.isdir(destination):
os.path.join(destination, file.file_path)
destination = os.path.join(destination, file.file_path)
else:
is_path = False