Bug 752204 - .gml2 files are modified during build

Turn off compression so that they aren't, except when scrub changes them
to a new format. In those cases the changes should be committed.
This commit is contained in:
John Ralls 2015-07-10 12:45:12 -07:00
parent b741c8e1de
commit d2fa23dd5f

View File

@ -42,6 +42,7 @@
#include <gnc-engine.h>
#include "../gnc-backend-xml.h"
#include "../io-gncxml-v2.h"
#include <gnc-prefs.h>
#include <test-stuff.h>
#include <unittest-support.h>
@ -91,6 +92,7 @@ test_load_file(const char *filename)
remove_locks(filename);
ignore_lock = (g_strcmp0(g_getenv("SRCDIR"), ".") != 0);
gnc_prefs_set_file_save_compressed(FALSE);
qof_session_begin(session, filename, ignore_lock, FALSE, TRUE);
qof_session_load(session, NULL);
@ -105,6 +107,7 @@ test_load_file(const char *filename)
"qof error=%d for file [%s]",
qof_session_get_error(session), filename);
/* Uncomment the line below to generate corrected files */
gnc_prefs_set_file_save_compressed(FALSE);
qof_session_save( session, NULL );
qof_session_end(session);
}