mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-02 13:34:51 +00:00
Fix saving files on another drive (windows) @EriHoss
This commit is contained in:
parent
f6ea3e9b42
commit
76ad29ae11
1 changed files with 2 additions and 7 deletions
|
|
@ -574,13 +574,8 @@ class Client:
|
|||
|
||||
if temp_file_path:
|
||||
final_file_path = os.path.join(directory, file_name)
|
||||
|
||||
try:
|
||||
os.remove(final_file_path)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
os.renames(temp_file_path, final_file_path)
|
||||
os.makedirs(directory, exist_ok=True)
|
||||
shutil.move(temp_file_path, final_file_path)
|
||||
except Exception as e:
|
||||
log.error(e, exc_info=True)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue