Fix possible issue if pref 'choose_directory_dialog_path' is None.

This commit is contained in:
Andrew Resch 2008-01-14 05:13:21 +00:00
parent 6b68ac9ad7
commit 642663604f
1 changed files with 3 additions and 1 deletions

View File

@ -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)