Problems running GnuCash 1.9.0 on kubuntu 5.10

Neil Williams linux at codehelp.co.uk
Sun Feb 12 12:17:55 EST 2006


On Sunday 12 February 2006 4:47 pm, Derek Atkins wrote:
> > I know how that happens - gnucash tries to identify the file by letting
> > each backend try to open it in turn. If none can open it, it complains
> > that it cannot understand which type of file it is meant to be. We can't
> > use mimetypes to distinguish the forms (as two are text/xml and we've
> > never enforced a mime-type on old files) so we do have to open the file
> > to determine the type.
>
> Well, the other option is to actually pass the error up the stack
> so that the caller can get a GNC_BACKEND_ERR_FILE_INACCESSIBLE (or
> something like that) up the stack..

But when trying to determine the type, all we know is if it is the correct 
type or not. In QSF, I'm implementing :
f=fopen(path, "r");
if(!f){ qof_backend_set_error(...);}
fclose(f); 
block that sets a new QofBackendError: ERR_FILEIO_READ_ERROR at the start of 
the file type check which I can also implement in gnucash. So at least then, 
if we can't open the file for reading, we can set a backend error and quit 
the load.

I'm still sorting out recursive copies.  I've got G2 to produce a 1.1Mb QSF 
XML file containing all my invoice data : gncInvoice, gncBillTerm, Account, 
Transaction, gncCustomer, gncJob, everything referenced by a gncInvoice is 
copied. Once sorted, I'll see about exporting individual invoices in this 
way. Right now, I've still got awkward problems with collections.

-- 

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

-------------- 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/20060212/d2b13e38/attachment.bin


More information about the gnucash-devel mailing list