r16093 - gnucash/trunk/src/import-export/qif-import - In QIF import, do not cat and merge accounts if imported_account_tree is empty.
Andreas Köhler
andi5 at cvs.gnucash.org
Fri May 18 10:54:11 EDT 2007
Author: andi5
Date: 2007-05-18 10:54:08 -0400 (Fri, 18 May 2007)
New Revision: 16093
Trac: http://svn.gnucash.org/trac/changeset/16093
Modified:
gnucash/trunk/src/import-export/qif-import/druid-qif-import.c
Log:
In QIF import, do not cat and merge accounts if imported_account_tree is empty.
If an error occurs while importing, imported_account_tree will be set to
#f, whereas functions called by gnc:account-tree-catenate-and-merge
would expect empty lists. So do not call that function at all.
Modified: gnucash/trunk/src/import-export/qif-import/druid-qif-import.c
===================================================================
--- gnucash/trunk/src/import-export/qif-import/druid-qif-import.c 2007-05-17 13:28:48 UTC (rev 16092)
+++ gnucash/trunk/src/import-export/qif-import/druid-qif-import.c 2007-05-18 14:54:08 UTC (rev 16093)
@@ -1888,9 +1888,10 @@
}
/* actually add in the new transactions. */
- scm_call_2(cat_and_merge,
- scm_c_eval_string("(gnc-get-current-root-account)"),
- wind->imported_account_tree);
+ if (wind->imported_account_tree != SCM_BOOL_F)
+ scm_call_2(cat_and_merge,
+ scm_c_eval_string("(gnc-get-current-root-account)"),
+ wind->imported_account_tree);
gnc_resume_gui_refresh();
More information about the gnucash-changes
mailing list