2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 12:57:52 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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: