DB-API: make autobackup configurable
Via command line: gramps --config=database:autobackup:1 ## True gramps --config=database:autobackup:0 ## True Or by editing gramps.ini.
This commit is contained in:
parent
0ce1a91dec
commit
68bd1e9038
@ -159,6 +159,7 @@ register('behavior.addons-url', "https://raw.githubusercontent.com/gramps-projec
|
||||
|
||||
register('database.backend', 'bsddb')
|
||||
register('database.compress-backup', True)
|
||||
register('database.autobackup', True) ## make backup when exiting, if there are changes
|
||||
register('database.path', os.path.join(HOME_DIR, 'grampsdb'))
|
||||
|
||||
register('export.proxy-order',
|
||||
|
@ -1795,7 +1795,8 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
||||
"""
|
||||
if self._directory:
|
||||
if update:
|
||||
self.autobackup(user)
|
||||
if config.get('database.autobackup'):
|
||||
self.autobackup(user)
|
||||
# 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