gnucash stable: Bug 798802 - Online Price quote - Stocks not working GNU 5.0 Windows

John Ralls jralls at code.gnucash.org
Wed Mar 29 23:01:27 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/a587dfff (commit)
	from  https://github.com/Gnucash/gnucash/commit/ecdd9dea (commit)



commit a587dfff2cffad61c4fc1d5d0da673766043ff89
Author: John Ralls <jralls at ceridwen.us>
Date:   Wed Mar 29 19:52:47 2023 -0700

    Bug 798802 - Online Price quote - Stocks not working GNU 5.0 Windows
    
    Change the property-tree path delimiter for constructing paths from
    '.' that's commonly used in stock symbols, to '|' that isn't.

diff --git a/libgnucash/app-utils/gnc-quotes.cpp b/libgnucash/app-utils/gnc-quotes.cpp
index 605b0f375f..69c6de5075 100644
--- a/libgnucash/app-utils/gnc-quotes.cpp
+++ b/libgnucash/app-utils/gnc-quotes.cpp
@@ -479,8 +479,9 @@ GncQuotesImpl::query_fq (const char* source, const StrVec& commodities)
                   commodities.cend(),
                   [source, &pt](auto sym)
                       {
-                          std::string key{source};
-                          key += "." + sym;
+                          using Path = bpt::ptree::path_type;
+                          Path key{source, '|'};
+                          key /= Path{sym, '|'};
                           pt.put(key, "");
                       });
     std::ostringstream result;



Summary of changes:
 libgnucash/app-utils/gnc-quotes.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)



More information about the gnucash-changes mailing list