Neil Williams <[EMAIL PROTECTED]> writes:

>> Now, I think I have my first (mini) bug.  When opening a file that the
>> user doesn't have read access to, the error is a bit cryptic:
>>
>>   The file type of file <FILENAME> is unknown.
>
> 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..  I've seen similar error-hiding
as a result of qof_session_export() not passing the error up the
stack.  :(

-derek
-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       [EMAIL PROTECTED]                        PGP key available
_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to