From e88c683aad163c93b40ce6fe37706d87195b1039 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 26 Jun 2024 18:55:40 +0530 Subject: [PATCH] ... --- src/calibre/db/restore.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/db/restore.py b/src/calibre/db/restore.py index 7ba72f8950..7a5da13232 100644 --- a/src/calibre/db/restore.py +++ b/src/calibre/db/restore.py @@ -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: