From 3c65caa5bae4fa9f91ffd88152724bd1de95dfdb Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Tue, 24 Jun 2025 12:14:49 +0100 Subject: [PATCH] Fix problem introduced in commit fb4654b, breaking removing the temporary DB. It can't use rmtree on a file path name. Commit: https://github.com/kovidgoyal/calibre/commit/fb4654bd911ec7ad15aae2d12e237950db140500 --- src/calibre/gui2/convert/gui_conversion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/convert/gui_conversion.py b/src/calibre/gui2/convert/gui_conversion.py index 818a10a480..3afc6ddddd 100644 --- a/src/calibre/gui2/convert/gui_conversion.py +++ b/src/calibre/gui2/convert/gui_conversion.py @@ -84,7 +84,7 @@ def gui_catalog(library_path, temp_db_path, fmt, title, dbspec, ids, out_file_na db.close() from calibre.db.backend import rmtree_with_retry try: - rmtree_with_retry(temp_db_path) + rmtree_with_retry(os.path.dirname(temp_db_path)) except PermissionError: if not iswindows: # probably some antivirus holding a file open, the folder will be deleted on exit anyway raise