Fix #143: Imposible to download file into directory

This commit is contained in:
Ilya Makarov 2019-06-26 22:28:39 +03:00
parent 8302e722a7
commit cf95a9080c

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