diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-07-26 11:38:49 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-07-26 11:38:49 +0800 |
commit | d9936675a5ebb50957dddd0e9568c1f2bcdf16ca (patch) | |
tree | 9e2226ad1e1e18cea988d177fae9c4c424d31295 /camel | |
parent | bb86fd83943d1a88ee921cf746f720dfbc08a4b3 (diff) | |
download | gsoc2013-evolution-d9936675a5ebb50957dddd0e9568c1f2bcdf16ca.tar.gz gsoc2013-evolution-d9936675a5ebb50957dddd0e9568c1f2bcdf16ca.tar.zst gsoc2013-evolution-d9936675a5ebb50957dddd0e9568c1f2bcdf16ca.zip |
If we're gonna do an elite hack, lets do it right.
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.
svn path=/trunk/; revision=17599
Diffstat (limited to 'camel')
-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) { |