"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libgnucash/backend/xml/gnc-xml-backend.cpp" between
gnucash-5.0.tar.bz2 and gnucash-5.1.tar.bz2

About: GnuCash is personal and small-business financial-accounting software.

gnc-xml-backend.cpp  (gnucash-5.0.tar.bz2):gnc-xml-backend.cpp  (gnucash-5.1.tar.bz2)
skipping to change at line 31 skipping to change at line 31
#include <platform.h> #include <platform.h>
#if PLATFORM(WINDOWS) #if PLATFORM(WINDOWS)
#include <windows.h> #include <windows.h>
#endif #endif
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <regex.h> #include <regex.h>
#if COMPILER(MSVC)
# define g_fopen fopen
#endif
#include <gnc-engine.h> //for GNC_MOD_BACKEND #include <gnc-engine.h> //for GNC_MOD_BACKEND
#include <gnc-uri-utils.h> #include <gnc-uri-utils.h>
#include <TransLog.h> #include <TransLog.h>
#include <gnc-prefs.h> #include <gnc-prefs.h>
#include <sstream> #include <sstream>
#include "gnc-xml-backend.hpp" #include "gnc-xml-backend.hpp"
#include "gnc-backend-xml.h" #include "gnc-backend-xml.h"
skipping to change at line 338 skipping to change at line 341
if (m_fullpath.empty()) if (m_fullpath.empty())
return false; return false;
GStatBuf statbuf; GStatBuf statbuf;
auto rc = g_stat (m_fullpath.c_str(), &statbuf); auto rc = g_stat (m_fullpath.c_str(), &statbuf);
return rc == 0; return rc == 0;
} }
void void
GncXmlBackend::export_coa(QofBook* book) 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) if (out == NULL)
{ {
set_error(ERR_FILEIO_WRITE_ERROR); set_error(ERR_FILEIO_WRITE_ERROR);
set_message(strerror(errno)); set_message(strerror(errno));
return; return;
} }
gnc_book_write_accounts_to_xml_filehandle_v2(this, book, out); gnc_book_write_accounts_to_xml_filehandle_v2(this, book, out);
fclose(out); fclose(out);
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)