aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-07-27 03:25:02 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-07-27 03:25:02 +0800
commit6fb402b631a1823fbc143a8ef6317cfec0eb0e67 (patch)
tree7e4145bdf3dc6eb476cc84f86e5c431ec2d804b5 /camel/providers
parent641d49b55bf78c9c7d6c32d08e9cc7b0e0f5a399 (diff)
downloadgsoc2013-evolution-6fb402b631a1823fbc143a8ef6317cfec0eb0e67.tar
gsoc2013-evolution-6fb402b631a1823fbc143a8ef6317cfec0eb0e67.tar.gz
gsoc2013-evolution-6fb402b631a1823fbc143a8ef6317cfec0eb0e67.tar.bz2
gsoc2013-evolution-6fb402b631a1823fbc143a8ef6317cfec0eb0e67.tar.lz
gsoc2013-evolution-6fb402b631a1823fbc143a8ef6317cfec0eb0e67.tar.xz
gsoc2013-evolution-6fb402b631a1823fbc143a8ef6317cfec0eb0e67.tar.zst
gsoc2013-evolution-6fb402b631a1823fbc143a8ef6317cfec0eb0e67.zip
If the path exists and is a directory, return non-NULL. Missed this before
2002-07-26 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-local-store.c (get_folder): If the path exists and is a directory, return non-NULL. Missed this before which is how we could return NULL even on success. Oops. svn path=/trunk/; revision=17618
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/local/camel-local-store.c5
-rw-r--r--camel/providers/local/camel-maildir-store.c6
-rw-r--r--camel/providers/local/camel-mbox-store.c3
-rw-r--r--camel/providers/local/camel-mh-store.c6
4 files changed, 10 insertions, 10 deletions
diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c
index a0d3708346..0fbb9eb14e 100644
--- a/camel/providers/local/camel-local-store.c
+++ b/camel/providers/local/camel-local-store.c
@@ -144,8 +144,9 @@ get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelExce
if (!S_ISDIR(st.st_mode)) {
camel_exception_setv(ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
_("Store root %s is not a regular directory"), path);
+ return NULL;
}
- return NULL;
+ return (CamelFolder *) 0xdeadbeef;
}
if (errno != ENOENT
@@ -175,7 +176,7 @@ get_folder(CamelStore * store, const char *folder_name, guint32 flags, CamelExce
*slash = '/';
} while (slash);
- return NULL;
+ return (CamelFolder *) 0xdeadbeef;
}
static CamelFolder *
diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c
index caae276e14..53d554d16a 100644
--- a/camel/providers/local/camel-maildir-store.c
+++ b/camel/providers/local/camel-maildir-store.c
@@ -85,14 +85,14 @@ CamelType camel_maildir_store_get_type(void)
return camel_maildir_store_type;
}
-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, *tmp, *cur, *new;
struct stat st;
CamelFolder *folder = NULL;
- (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);
diff --git a/camel/providers/local/camel-mbox-store.c b/camel/providers/local/camel-mbox-store.c
index 3333580766..cfe3429713 100644
--- a/camel/providers/local/camel-mbox-store.c
+++ b/camel/providers/local/camel-mbox-store.c
@@ -81,8 +81,7 @@ 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);
diff --git a/camel/providers/local/camel-mh-store.c b/camel/providers/local/camel-mh-store.c
index f653fdb408..a92db83797 100644
--- a/camel/providers/local/camel-mh-store.c
+++ b/camel/providers/local/camel-mh-store.c
@@ -185,13 +185,13 @@ 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);