This commit is contained in:
Kovid Goyal 2024-06-26 18:55:40 +05:30
parent 62095818fa
commit e88c683aad
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -337,6 +337,8 @@ class Restore(Thread):
old_notes_path = os.path.join(self.src_library_path, NOTES_DIR_NAME)
new_notes_path = os.path.join(self.library_path, NOTES_DIR_NAME)
temp = old_notes_path + '-staging'
with suppress(OSError):
shutil.rmtree(temp)
try:
shutil.move(new_notes_path, temp)
except OSError: