From 642663604f3bd50fff333f4d54a40d2421c32c75 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 14 Jan 2008 05:13:21 +0000 Subject: [PATCH] Fix possible issue if pref 'choose_directory_dialog_path' is None. --- src/dialogs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dialogs.py b/src/dialogs.py index effe8ba2c..f85852776 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -531,7 +531,9 @@ def show_directory_chooser_dialog(parent, title): chooser.set_icon(common.get_logo(18)) chooser.set_property("skip-taskbar-hint", True) config = pref.Preferences() - chooser.set_current_folder(config.get("choose_directory_dialog_path")) + current_folder = config.get("choose_directory_dialog_path") + if current_folder != None: + chooser.set_current_folder(current_folder) if chooser.run() == gtk.RESPONSE_OK: result = chooser.get_filename() config.set("choose_directory_dialog_path", result)