aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder.c
diff options
context:
space:
mode:
authorNotZed <NotZed@HelixCode.com>2000-02-29 04:10:54 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-02-29 04:10:54 +0800
commitbbbee6ba116f1df65514776657e86bc6182a0f56 (patch)
treebb1eda0ff4a2c409c429d543743389ac93ccacef /camel/camel-folder.c
parentce16b05aed027e814af0a36bd76dc49cfb22df2f (diff)
downloadgsoc2013-evolution-bbbee6ba116f1df65514776657e86bc6182a0f56.tar
gsoc2013-evolution-bbbee6ba116f1df65514776657e86bc6182a0f56.tar.gz
gsoc2013-evolution-bbbee6ba116f1df65514776657e86bc6182a0f56.tar.bz2
gsoc2013-evolution-bbbee6ba116f1df65514776657e86bc6182a0f56.tar.lz
gsoc2013-evolution-bbbee6ba116f1df65514776657e86bc6182a0f56.tar.xz
gsoc2013-evolution-bbbee6ba116f1df65514776657e86bc6182a0f56.tar.zst
gsoc2013-evolution-bbbee6ba116f1df65514776657e86bc6182a0f56.zip
No, its not a fatal error to search on a non-searchable folder, you just
2000-02-28 NotZed <NotZed@HelixCode.com> * camel-folder.c (camel_folder_search_by_expression): No, its not a fatal error to search on a non-searchable folder, you just dont get any matches. (_open): Dont open an opened folder (i dont see why this is really a bug, but what the hell ...) * providers/mbox/camel-mbox-folder.c (_init): Set search cap on. (_open): Call parent class to perform open. Remove folder-open check to parent instead. svn path=/trunk/; revision=1984
Diffstat (limited to 'camel/camel-folder.c')
-rw-r--r--camel/camel-folder.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 5097caa295..0e2a234d06 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -274,6 +274,13 @@ _open (CamelFolder *folder,
CamelFolderOpenMode mode,
CamelException *ex)
{
+ if (folder->open_state == FOLDER_OPEN) {
+ camel_exception_set (ex,
+ CAMEL_EXCEPTION_FOLDER_INVALID_STATE,
+ "folder is already open");
+ return;
+ }
+
folder->open_state = FOLDER_OPEN;
folder->open_mode = mode;
}
@@ -1397,7 +1404,7 @@ GList *camel_folder_search_by_expression (CamelFolder *folder,
CamelException *ex)
{
g_assert (folder != NULL);
- g_assert (folder->has_search_capability);
+ g_return_val_if_fail (folder->has_search_capability, NULL);
return CF_CLASS (folder)->search_by_expression (folder, expression, ex);
}