Skip to content

Commit 04d6601

Browse files
committed
Always write XML files with Unix line endings.
So that file size comparisons in test-load-save-files pass on Windows.
1 parent 6fab138 commit 04d6601

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libgnucash/backend/xml/io-gncxml-v2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ gnc_book_write_to_xml_file_v2 (QofBook* book, const char* filename,
15991599
{
16001600
bool success = true;
16011601

1602-
auto [file, thread] = try_gz_open (filename, "w", compress, TRUE);
1602+
auto [file, thread] = try_gz_open (filename, "wb", compress, TRUE);
16031603
if (!file)
16041604
return false;
16051605

@@ -1633,7 +1633,7 @@ gnc_book_write_accounts_to_xml_file_v2 (QofBackend* qof_be, QofBook* book,
16331633
FILE* out;
16341634
gboolean success = TRUE;
16351635

1636-
out = g_fopen (filename, "w");
1636+
out = g_fopen (filename, "wb");
16371637

16381638
/* Try to write as much as possible */
16391639
if (!out

0 commit comments

Comments
 (0)