* src/GrampsDbUtils/_Backup.py (__do_export): check for existance before deleting

2007-06-13  Don Allingham  <don@gramps-project.org>


svn: r8548
This commit is contained in:
Don Allingham
2007-06-14 04:26:46 +00:00
parent 06d9588736
commit 9b8759a25b
3 changed files with 7 additions and 2 deletions

View File

@@ -351,7 +351,8 @@ class DbManager:
# delete files that are not backup files or the .txt file
for filename in os.listdir(dirname):
if os.path.splitext(filename)[1] not in (".gbkp", ".txt"):
os.unlink(os.path.join(dirname,filename))
fname = os.path.join(dirname,filename)
os.unlink(fname)
dbclass = GrampsDb.gramps_db_factory(db_type = "x-directory/normal")
db = dbclass(Config.get(Config.TRANSACTIONS))