From 012374cff565b6f6de3df845235d1c125f037f97 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 14 Jun 2007 04:36:31 +0000 Subject: [PATCH] 2007-06-13 Alex Roitman * src/GrampsDb/_GrampsDBDir.py (open_undodb): Override the base method by using undo.db inside the data directory. svn: r8549 --- ChangeLog | 4 ++++ src/GrampsDb/_GrampsDBDir.py | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4cbe22723..954a3a0ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-06-13 Alex Roitman + * src/GrampsDb/_GrampsDBDir.py (open_undodb): Override the base + method by using undo.db inside the data directory. + 2007-06-13 Don Allingham * src/GrampsDbUtils/_Backup.py (__do_export): check for existance before deleting diff --git a/src/GrampsDb/_GrampsDBDir.py b/src/GrampsDb/_GrampsDBDir.py index eaed85e75..a725244bf 100644 --- a/src/GrampsDb/_GrampsDBDir.py +++ b/src/GrampsDb/_GrampsDBDir.py @@ -561,6 +561,16 @@ class GrampsDBDir(GrampsDbBase,UpdateCallback): return 1 + def open_undodb(self): + """ + Override method from GrampsDbBase because in DIR setup we want + the undo database to be inside the dir. + """ + if not self.readonly: + self.undolog = os.path.join(self.full_name, "undo.db") + self.undodb = db.DB() + self.undodb.open(self.undolog, db.DB_RECNO, db.DB_CREATE) + def load_from(self, other_database, filename, callback): try: self.load(filename,callback)