Fix dbapi dbs for closeing read-only db crash (#623)
Fixes #10613 The sqlite (and other dbapi dbs) tried to save their metadata on a close operation, which doesn't work for read-only dbs.
This commit is contained in:
parent
58c6da3fb5
commit
31eecac590
@ -671,7 +671,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
||||
if update is False, don't change access times, etc.
|
||||
"""
|
||||
if self._directory != ":memory:":
|
||||
if update:
|
||||
if update and not self.readonly:
|
||||
# This is just a dummy file to indicate last modified time of
|
||||
# the database for gramps.cli.clidbman:
|
||||
filename = os.path.join(self._directory, "meta_data.db")
|
||||
|
Loading…
Reference in New Issue
Block a user