2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-09-01 14:55:12 +00:00

Return the good looking absolute path instead of an ugly relative one #37

This commit is contained in:
Dan
2018-03-21 16:17:13 +01:00
committed by GitHub
parent fa6af8695e
commit 569ab1696a

View File

@@ -575,7 +575,7 @@ class Client:
)
if temp_file_path:
final_file_path = re.sub("\\\\", "/", os.path.join(directory, file_name))
final_file_path = os.path.abspath(re.sub("\\\\", "/", os.path.join(directory, file_name)))
os.makedirs(directory, exist_ok=True)
shutil.move(temp_file_path, final_file_path)
except Exception as e: