mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-20 17:05:18 +01:00
Database: Explicitly test for case sensitivity on OS X instead of assuming a case insensitive filesystem. Fixes #796258 (Various file management functions/integrity checks broken on case sensitive OSX)
This commit is contained in:
parent
c1c5c8e676
commit
ba2b3f05bd
1 changed files with 4 additions and 3 deletions
|
|
@ -26,7 +26,7 @@
|
|||
from calibre.library.sqlite import connect, IntegrityError
|
||||
from calibre.library.prefs import DBPrefs
|
||||
from calibre.ebooks.metadata.book.base import Metadata
|
||||
from calibre.constants import preferred_encoding, iswindows, isosx, filesystem_encoding
|
||||
from calibre.constants import preferred_encoding, iswindows, filesystem_encoding
|
||||
from calibre.ptempfile import PersistentTemporaryFile
|
||||
from calibre.customize.ui import run_plugins_on_import
|
||||
from calibre import isbytestring
|
||||
|
|
@ -188,8 +188,9 @@ def __init__(self, library_path, row_factory=False, default_prefs=None,
|
|||
apply_default_prefs = not os.path.exists(self.dbpath)
|
||||
self.connect()
|
||||
|
||||
self.is_case_sensitive = not iswindows and not isosx and \
|
||||
not os.path.exists(self.dbpath.replace('metadata.db', 'MeTAdAtA.dB'))
|
||||
self.is_case_sensitive = (not iswindows and
|
||||
not os.path.exists(self.dbpath.replace('metadata.db',
|
||||
'MeTAdAtA.dB')))
|
||||
SchemaUpgrade.__init__(self)
|
||||
# Guarantee that the library_id is set
|
||||
self.library_id
|
||||
|
|
|
|||
Loading…
Reference in a new issue