From 1f720bec773166ded27ced0a311f656723738bb2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 21 Nov 2010 08:04:11 -0700 Subject: [PATCH] Speedup database initialization be using exists instead of a permissions check for covers --- src/calibre/library/database2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/library/database2.py b/src/calibre/library/database2.py index 6d18a2d663..8e7002097a 100644 --- a/src/calibre/library/database2.py +++ b/src/calibre/library/database2.py @@ -771,7 +771,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns): except: # Can happen if path has not yet been set return False - return os.access(path, os.R_OK) + return os.path.exists(path) def remove_cover(self, id, notify=True): path = os.path.join(self.library_path, self.path(id, index_is_id=True), 'cover.jpg')