2006-11-19 Don Allingham <don@gramps-project.org>

* src/DbLoader.py: try to catch a None value for default directory



svn: r7654
This commit is contained in:
Don Allingham 2006-11-20 03:29:16 +00:00
parent 291b195c7f
commit 0ab60cd632
2 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,6 @@
2006-11-19 Don Allingham <don@gramps-project.org>
* src/DbLoader.py: try to catch a None value for default directory
2006-11-19 Brian Matherly <brian@gramps-project.org>
* src/ViewManager.py: Fix 0000576: Credits window behind about window

View File

@ -482,13 +482,17 @@ class DbLoader:
def get_default_dir():
# Suggested folder: try last open file, last import, last export,
# then home.
default_dir = os.path.dirname(Config.get(Config.RECENT_FILE)) + os.path.sep
if len(default_dir)<=1:
default_dir = Config.get(Config.RECENT_IMPORT_DIR)
if len(default_dir)<=1:
default_dir = Config.get(Config.RECENT_EXPORT_DIR)
if len(default_dir)<=1:
default_dir = '~/'
default_dir = os.path.dirname(Config.get(Config.RECENT_FILE))
if default_dir:
default_dir += os.path.sep
if len(default_dir)<=1:
default_dir = Config.get(Config.RECENT_IMPORT_DIR)
if len(default_dir)<=1:
default_dir = Config.get(Config.RECENT_EXPORT_DIR)
if len(default_dir)<=1:
default_dir = '~/'
else:
default_dir = "~/"
return default_dir
#-------------------------------------------------------------------------