gnucash stable: [assistant-qif-import.c] if user cancelled QIF file dialog, bail out
Christopher Lam
clam at code.gnucash.org
Sun Sep 24 21:20:15 EDT 2023
Updated via https://github.com/Gnucash/gnucash/commit/3d06678c (commit)
from https://github.com/Gnucash/gnucash/commit/b5816641 (commit)
commit 3d06678cd5b2e7f7ffbdfa4811d6c023074506fc
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Sep 25 09:06:40 2023 +0800
[assistant-qif-import.c] if user cancelled QIF file dialog, bail out
instead of inserting the default_dir
diff --git a/gnucash/import-export/qif-imp/assistant-qif-import.c b/gnucash/import-export/qif-imp/assistant-qif-import.c
index 25d67ab27e..09f30d7c93 100644
--- a/gnucash/import-export/qif-imp/assistant-qif-import.c
+++ b/gnucash/import-export/qif-imp/assistant-qif-import.c
@@ -1784,11 +1784,11 @@ gnc_ui_qif_import_select_file_cb (GtkButton * button,
g_list_prepend (NULL, filter),
default_dir,
GNC_FILE_DIALOG_IMPORT);
-
- /* Insure valid data, and something that can be freed. */
+ /* If NULL then the user cancelled the file dialog. */
if (new_file_name == NULL)
{
- file_name = g_strdup (default_dir);
+ g_free (default_dir);
+ return;
}
else if (!g_path_is_absolute (new_file_name))
{
Summary of changes:
gnucash/import-export/qif-imp/assistant-qif-import.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
More information about the gnucash-changes
mailing list