mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Implement #2575 (Optional config option to specify alternate location of metadata.db)
This commit is contained in:
parent
22a2420450
commit
4c6bcf512f
@ -413,6 +413,8 @@ class LibraryDatabase2(LibraryDatabase):
|
||||
self.library_path = os.path.abspath(library_path)
|
||||
self.row_factory = row_factory
|
||||
self.dbpath = os.path.join(library_path, 'metadata.db')
|
||||
self.dbpath = os.environ.get('CALIBRE_OVERRIDE_DATABASE_PATH',
|
||||
self.dbpath)
|
||||
if isinstance(self.dbpath, unicode):
|
||||
self.dbpath = self.dbpath.encode(filesystem_encoding)
|
||||
self.connect()
|
||||
|
Loading…
x
Reference in New Issue
Block a user