From cf95a9080c886352548c55b62f552f66ade0075a Mon Sep 17 00:00:00 2001 From: Ilya Makarov Date: Wed, 26 Jun 2019 22:28:39 +0300 Subject: [PATCH] Fix #143: Imposible to download file into directory --- aiogram/types/mixins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiogram/types/mixins.py b/aiogram/types/mixins.py index f11a1760..13f8412f 100644 --- a/aiogram/types/mixins.py +++ b/aiogram/types/mixins.py @@ -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