diff --git a/ChangeLog b/ChangeLog index 42044bdd5..6aa7b4406 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2006-11-19 Don Allingham + * src/DbLoader.py: try to catch a None value for default directory + 2006-11-19 Brian Matherly * src/ViewManager.py: Fix 0000576: Credits window behind about window diff --git a/src/DbLoader.py b/src/DbLoader.py index aade65b90..3c150727b 100644 --- a/src/DbLoader.py +++ b/src/DbLoader.py @@ -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 #-------------------------------------------------------------------------