[evolution-kolab/ek-wip-porting: 27/36] KolabMailAccess: need to down-sync folder info before creating new folder
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-porting: 27/36] KolabMailAccess: need to down-sync folder info before creating new folder
- Date: Tue, 18 Sep 2012 15:22:11 +0000 (UTC)
commit 456e3c4fc567bd2ab3526918ea5b206cef0a7fc4
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Tue Sep 18 10:45:40 2012 +0200
KolabMailAccess: need to down-sync folder info before creating new folder
* when creating a new PIM folder, we require online operational
mode, so we can simply down-sync folder information from the
server before creating a new folder
* this will update the folder information in the local InfoDb,
which we then query for folder existence
* updating the InfoDb just before querying for folder existence
somewhat reduces the inherent raciness of folder creation
(and type setting)
src/libekolab/kolab-mail-access.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/libekolab/kolab-mail-access.c b/src/libekolab/kolab-mail-access.c
index f07069e..80259c5 100644
--- a/src/libekolab/kolab-mail-access.c
+++ b/src/libekolab/kolab-mail-access.c
@@ -3035,6 +3035,16 @@ kolab_mail_access_create_source (KolabMailAccess *self,
goto exit;
}
+ /* folder info update */
+ ok = mail_access_sync_with_server (self,
+ KOLAB_MAIL_ACCESS_OPMODE_ONLINE,
+ NULL, /* NULL means all folders */
+ FALSE, /* folder info only */
+ cancellable,
+ &tmp_err);
+ if (! ok)
+ goto exit;
+
/* check whether folder exists */
exists = kolab_mail_info_db_exists_foldername (priv->infodb,
sourcename,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]