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