From 1363bc081251558d0490ecbbecb151fba008fc59 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Fri, 26 Jul 2002 17:03:02 +0000 Subject: Revert Jeff's previous change, it broke local folders. Uninitialized 2002-07-26 Peter Williams * Revert Jeff's previous change, it broke local folders. Uninitialized exceptions or something. svn path=/trunk/; revision=17605 --- camel/providers/local/camel-local-store.c | 4 ++-- camel/providers/local/camel-maildir-store.c | 5 +++-- camel/providers/local/camel-mbox-store.c | 7 ++++--- camel/providers/local/camel-mh-store.c | 8 ++++---- 4 files changed, 13 insertions(+), 11 deletions(-) (limited to 'camel/providers') diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c index 419bfdae72..a0d3708346 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 (CamelFolder *) 0xdeadbeef; + + return NULL; } static CamelFolder * diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c index f7f267e0be..caae276e14 100644 --- a/camel/providers/local/camel-maildir-store.c +++ b/camel/providers/local/camel-maildir-store.c @@ -91,9 +91,10 @@ static CamelFolder *get_folder(CamelStore * store, const char *folder_name, guin struct stat st; CamelFolder *folder = NULL; - if (!((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, ex)) + (void) ((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, ex); + if (camel_exception_is_set(ex)) return NULL; - + name = g_strdup_printf("%s%s", CAMEL_LOCAL_STORE(store)->toplevel_dir, folder_name); tmp = g_strdup_printf("%s/tmp", name); cur = g_strdup_printf("%s/cur", name); diff --git a/camel/providers/local/camel-mbox-store.c b/camel/providers/local/camel-mbox-store.c index df6709c699..3333580766 100644 --- a/camel/providers/local/camel-mbox-store.c +++ b/camel/providers/local/camel-mbox-store.c @@ -80,10 +80,11 @@ get_folder(CamelStore *store, const char *folder_name, guint32 flags, CamelExcep { char *name; struct stat st; - - if (!((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, ex)) + + (void) ((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, ex); + if (camel_exception_is_set(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 8f98e7a86b..f653fdb408 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; - if (!((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, ex)) + (void) ((CamelStoreClass *)parent_class)->get_folder(store, folder_name, flags, ex); + if (camel_exception_is_set(ex)) return NULL; - + name = g_strdup_printf("%s%s", CAMEL_LOCAL_STORE(store)->toplevel_dir, folder_name); if (stat(name, &st) == -1) { -- cgit