gnucash stable: Bug 798885 - Accented character in folder name on Account Export

Robert Fewell bobit at code.gnucash.org
Fri Apr 28 04:57:50 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/fb58959f (commit)
	from  https://github.com/Gnucash/gnucash/commit/49e34b5e (commit)



commit fb58959f9a8a46e70e0486359b658d2e3084110e
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Fri Apr 28 09:55:57 2023 +0100

    Bug 798885 - Accented character in folder name on Account Export
    
    Changed export_coa to use g_fopen instead of fopen

diff --git a/libgnucash/backend/xml/gnc-xml-backend.cpp b/libgnucash/backend/xml/gnc-xml-backend.cpp
index f1aa9e5109..b1c7deba54 100644
--- a/libgnucash/backend/xml/gnc-xml-backend.cpp
+++ b/libgnucash/backend/xml/gnc-xml-backend.cpp
@@ -28,6 +28,9 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <regex.h>
+#if COMPILER(MSVC)
+# define g_fopen fopen
+#endif
 
 #include <gnc-engine.h> //for GNC_MOD_BACKEND
 #include <gnc-uri-utils.h>
@@ -337,7 +340,7 @@ GncXmlBackend::save_may_clobber_data()
 void
 GncXmlBackend::export_coa(QofBook* book)
 {
-    auto out = fopen(m_fullpath.c_str(), "w");
+    auto out = g_fopen(m_fullpath.c_str(), "w");
     if (out == NULL)
     {
         set_error(ERR_FILEIO_WRITE_ERROR);



Summary of changes:
 libgnucash/backend/xml/gnc-xml-backend.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list