gnucash not saving nor warning when partition full

Neil Williams linux at codehelp.co.uk
Tue Apr 5 14:35:32 EDT 2005


On Tuesday 05 April 2005 6:34 pm, Derek Atkins wrote:
> Unfortunately it's not trivial, because the API between the UI and the
> non-UI bits don't pass enough information to notice the error.

Could we check the return value of the fprintf in line 931 (and elsewhere) in 
src/backend/file/io-gncxml-v2.c and set a QofBackendError ? (using 
qof_book_get_backend?)

xmlElemDump is a void prototype:
http://www.xmlsoft.org/html/libxml-tree.html#xmlElemDump
but in each case in io-gnc-xml-v2.c, it is followed by an fprintf.

It wouldn't be particularly specific, but it would indicate that the write 
functions failed - for whatever reason.

In QSF, I use xmlDocFormatDump which does return a negative value on error - 
although I'm not utilising that at the moment.
http://www.xmlsoft.org/html/libxml-tree.html#xmlDocFormatDump

I can check for a negative return int and set the same QofBackendError - added 
to qofbackend.h and an appropriate message in src/app-file/gnc-file.c - would 
that solve the bug?


-- 

Neil Williams
=============
http://www.dcglug.org.uk/
http://www.nosoftwarepatents.com/
http://sourceforge.net/projects/isbnsearch/
http://www.neil.williamsleesmill.me.uk/
http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20050405/41ae25ff/attachment.bin


More information about the gnucash-devel mailing list