mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-10 11:15:27 +00:00
Create file_name directory trees in download_worker
This commit is contained in:
@@ -516,6 +516,9 @@ class Client:
|
||||
# Make file_dir if it was specified
|
||||
os.makedirs(file_dir, exist_ok=True)
|
||||
|
||||
if file_name is not None:
|
||||
os.makedirs(os.path.dirname(file_name), exist_ok=True)
|
||||
|
||||
if isinstance(media, types.MessageMediaDocument):
|
||||
document = media.document
|
||||
|
||||
|
Reference in New Issue
Block a user