From cdb4c42f62bf10214a6e0db96397b8ce7be86fd7 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Fri, 7 Apr 2006 04:21:02 +0000 Subject: [PATCH] When writing a currency to the data file, write the full commodity data block for backward compatibility with 1.8, instead of just writing the quote source information. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13742 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/backend/file/gnc-commodity-xml-v2.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/backend/file/gnc-commodity-xml-v2.c b/src/backend/file/gnc-commodity-xml-v2.c index 62967d5f03..a964fc4c78 100644 --- a/src/backend/file/gnc-commodity-xml-v2.c +++ b/src/backend/file/gnc-commodity-xml-v2.c @@ -79,7 +79,13 @@ gnc_commodity_dom_tree_create(const gnc_commodity *com) xmlAddChild(ret, text_to_dom_tree(cmdty_id, gnc_commodity_get_mnemonic(com))); - if (!currency) { + /* Enforce backward compatability with 1.8 for the 1.9/2.0 release + * series. */ + if ( +#if (GNUCASH_MAJOR_VERSION < 2) || ((GNUCASH_MAJOR_VERSION == 2) && (GNUCASH_MINOR_VERSION == 0)) + TRUE || +#endif + !currency) { if(gnc_commodity_get_fullname(com)) { xmlAddChild(ret, text_to_dom_tree(cmdty_name,