mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-31 12:44:52 +00:00
Create file_name directory trees in download_worker
This commit is contained in:
parent
c0212a7b10
commit
db80c72b08
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue