2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 05:18:10 +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: 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) os.makedirs(directory, exist_ok=True)
shutil.move(temp_file_path, final_file_path) shutil.move(temp_file_path, final_file_path)
except Exception as e: except Exception as e: