diff options
-rw-r--r-- | camel/ChangeLog | 17 | ||||
-rw-r--r-- | camel/providers/local/camel-local-store.c | 4 | ||||
-rw-r--r-- | camel/providers/local/camel-mbox-store.c | 7 | ||||
-rw-r--r-- | camel/providers/local/camel-mh-store.c | 8 |
4 files changed, 26 insertions, 10 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 9abe58bc76..e949f611f0 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,20 @@ +2002-07-25 Jeffrey Stedfast <fejj@ximian.com> + + If we're gonna do an elite hack, lets do it right. + + * providers/local/camel-local-store.c (get_folder): On success, + return non-NULL so that our caller doesn't have to depend on 'ex' + being non-NULL in order to work correctly. + + * providers/local/camel-mbox-store.c (get_folder): Don't bother + checking if an exception was set, just use the return value of + camel-local-store's get_folder. + + * providers/local/camel-maildir-store.c (get_folder): Same as the + mbox change. + + * providers/local/camel-mh-store.c (get_folder): Here too. + 2002-07-25 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-summary.h diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c index a0d3708346..419bfdae72 100644 --- a/camel/providers/local/camel-local-store.c +++ b/camel/providers/local/camel-local-store.c @@ -174,8 +174,8 @@ get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelExce if (slash) *slash = '/'; } while (slash); - - return NULL; + + return (CamelFolder *) 0xdeadbeef; } static CamelFolder * diff --git a/camel/providers/local/camel-mbox-store.c b/camel/providers/local/camel-mbox-store.c index 3333580766..df6709c699 100644 --- a/camel/providers/local/camel-mbox-store.c +++ b/camel/providers/local/camel-mbox-store.c @@ -80,11 +80,10 @@ get_folder(CamelStore *store, const char *folder_name, guint32 flags, CamelExcep { char *name; struct stat st; - - (void) ((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, ex); - if (camel_exception_is_set(ex)) + + if (!((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, ex)) return NULL; - + name = g_strdup_printf("%s%s", CAMEL_LOCAL_STORE(store)->toplevel_dir, folder_name); if (stat(name, &st) == -1) { diff --git a/camel/providers/local/camel-mh-store.c b/camel/providers/local/camel-mh-store.c index f653fdb408..8f98e7a86b 100644 --- a/camel/providers/local/camel-mh-store.c +++ b/camel/providers/local/camel-mh-store.c @@ -185,15 +185,15 @@ fail: camel_object_unref(out); } -static CamelFolder *get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelException * ex) +static CamelFolder * +get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelException * ex) { char *name; struct stat st; - (void) ((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, ex); - if (camel_exception_is_set(ex)) + if (!((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, ex)) return NULL; - + name = g_strdup_printf("%s%s", CAMEL_LOCAL_STORE(store)->toplevel_dir, folder_name); if (stat(name, &st) == -1) { |