[Evolution-hackers] e_cal/book_open() + only_if_exists



Hello!

With EDS 3.2 and 3.3 I've seen the following problem on a clean account
(no databases, no gconf keys):
      * An invocation of SyncEvolution to list databases calls
        e_book_new_system_addressbook(), which creates a
        gconf /apps/evolution/addressbook/sources entry for the system
        address book.
      * A second invocation of SyncEvolution finds the definition of the
        system address book via e_book_get_addressbooks() and tries to
        open it with e_book_open(only_if_exists=false), which then fails
        with various errors, depending on the EDS version ("Cannot open
        book: db error 0x2 (No such file or directory)" in 3.2,
        "DB_RUNRECOVERY" in 3.3).

The problem can be avoided by always passing only_if_exists=true to the
open calls. The way how the API is defined and/or implemented, creating
an database definition and creating the actual database files are two
different steps.

Therefore a client can never be sure whether a database really exists,
and thus it always to pass only_if_exists=true.

If that is the case, then why have it at all? We might as well ignore
the value in the current implementations and mark it as deprecated in
the APIs.

Or do I miss something?

-- 
Bye, Patrick Ohly
--  
Patrick Ohly gmx de
http://www.estamos.de/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]