summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dlg-add-files.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/dlg-add-files.c b/src/dlg-add-files.c
index 7ece634..03f3828 100644
--- a/src/dlg-add-files.c
+++ b/src/dlg-add-files.c
@@ -64,15 +64,18 @@ file_sel_response_cb (GtkWidget *widget,
current_folder = gtk_file_chooser_get_current_folder_uri (file_sel);
uri = gtk_file_chooser_get_uri (file_sel);
- g_settings_set_string (data->settings, PREF_ADD_CURRENT_FOLDER, current_folder);
+
+ if (current_folder != NULL) {
+ g_settings_set_string (data->settings, PREF_ADD_CURRENT_FOLDER, current_folder);
+ fr_window_set_add_default_dir (window, current_folder);
+ }
if (uri != NULL)
{
g_settings_set_string (data->settings, PREF_ADD_FILENAME, uri);
+ g_free (uri);
}
- fr_window_set_add_default_dir (window, current_folder);
- g_free (uri);
if ((response == GTK_RESPONSE_CANCEL) || (response == GTK_RESPONSE_DELETE_EVENT)) {
gtk_widget_destroy (data->dialog);