InMemoryDB: load last, set has_changed = False

This commit is contained in:
Doug Blank 2016-04-17 00:31:05 -04:00
parent 084830c743
commit cc650da616

View File

@ -63,11 +63,12 @@ class InMemoryDB(DBAPI):
from gramps.plugins.importer.importxml import importData
from gramps.cli.user import User
if self._directory:
backups = list(reversed(glob.glob(os.path.join(
self._directory, "backup-*.gramps"))))
backups = sorted(glob.glob(os.path.join(
self._directory, "backup-*.gramps")), reverse=True)
if backups:
filename = backups[0]
if os.path.isfile(filename):
importData(self, filename, User())
self.reindex_reference_map(lambda progress: None)
self.rebuild_secondary(lambda progress: None)
self.has_changed = False