Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Commit 4edaa21

Browse files
committed
Don't create download dirs for in-memory downloads
1 parent a2fe5b3 commit 4edaa21

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pyrogram/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ def load_plugins(self):
726726
async def handle_download(self, packet):
727727
file_id, directory, file_name, in_memory, file_size, progress, progress_args = packet
728728

729-
os.makedirs(directory, exist_ok=True)
729+
os.makedirs(directory, exist_ok=True) if not in_memory else None
730730
temp_file_path = os.path.abspath(re.sub("\\\\", "/", os.path.join(directory, file_name))) + ".temp"
731731
file = BytesIO() if in_memory else open(temp_file_path, "wb")
732732

0 commit comments

Comments
 (0)