mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-16 18:25:11 -06:00
Fix return value of gnc_book_write_to_xml_file_v2()
81b9a02235
changed the behaviour of the
"success" variable that's used for the return value, so now the value is
being repeatedly overwritten instead of being combined with the result of
the next call.
Restore the original behaviour of setting success to false on failure.
This commit is contained in:
parent
ba7b26066e
commit
4b83068c6b
@ -1602,14 +1602,19 @@ gnc_book_write_to_xml_file_v2 (QofBook* book, const char* filename,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Try to write as much as possible */
|
/* Try to write as much as possible */
|
||||||
success = (gnc_book_write_to_xml_filehandle_v2 (book, file));
|
if (!gnc_book_write_to_xml_filehandle_v2 (book, file))
|
||||||
|
success = false;
|
||||||
|
|
||||||
/* Close the output stream */
|
/* Close the output stream */
|
||||||
success = ! (fclose (file));
|
if (fclose (file))
|
||||||
|
success = false;
|
||||||
|
|
||||||
/* Optionally wait for parallel compression threads */
|
/* Optionally wait for parallel compression threads */
|
||||||
if (thread)
|
if (thread)
|
||||||
success = g_thread_join (thread) != nullptr;
|
{
|
||||||
|
if (g_thread_join (thread) != nullptr)
|
||||||
|
success = false;
|
||||||
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user