From ad62a99f1351af47318801e7e44de070cc0f8a4d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 30 Apr 2009 18:06:25 -0700 Subject: [PATCH] Fix #2371 (error 32 while removing books from calibre-reproducible) --- src/calibre/library/database2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/library/database2.py b/src/calibre/library/database2.py index 5683619816..bc94d4faa3 100644 --- a/src/calibre/library/database2.py +++ b/src/calibre/library/database2.py @@ -760,9 +760,9 @@ class LibraryDatabase2(LibraryDatabase): path = os.path.join(self.library_path, self.path(id, index_is_id=True)) self.data.remove(id) if os.path.exists(path): - if iswindows: + try: winshell.delete_file(path, no_confirm=True, silent=True) - else: + except: self.rmtree(path) parent = os.path.dirname(path) if len(os.listdir(parent)) == 0: