mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Speedup database initialization be using exists instead of a permissions check for covers
This commit is contained in:
parent
a340048c2b
commit
1f720bec77
@ -771,7 +771,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
|||||||
except:
|
except:
|
||||||
# Can happen if path has not yet been set
|
# Can happen if path has not yet been set
|
||||||
return False
|
return False
|
||||||
return os.access(path, os.R_OK)
|
return os.path.exists(path)
|
||||||
|
|
||||||
def remove_cover(self, id, notify=True):
|
def remove_cover(self, id, notify=True):
|
||||||
path = os.path.join(self.library_path, self.path(id, index_is_id=True), 'cover.jpg')
|
path = os.path.join(self.library_path, self.path(id, index_is_id=True), 'cover.jpg')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user