aboutsummaryrefslogtreecommitdiff
path: root/libsylph/imap.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-11-09 05:02:12 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-11-09 05:02:12 +0000
commit3f401c36fd71a93b780fdf8f63686d324b7812bd (patch)
tree05c51472a4802fe611b5dc50e391df86ee44c06a /libsylph/imap.c
parentaa83e9d1c87b286c27de2053ea91b83c3363212f (diff)
fixed opening message by syl_plugin_open_message() on IMAP folder.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2340 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/imap.c')
-rw-r--r--libsylph/imap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libsylph/imap.c b/libsylph/imap.c
index c69ed0fe..2d25950c 100644
--- a/libsylph/imap.c
+++ b/libsylph/imap.c
@@ -1248,6 +1248,7 @@ static MsgInfo *imap_get_msginfo(Folder *folder, FolderItem *item, gint uid)
IMAPSession *session;
GSList *list;
MsgInfo *msginfo = NULL;
+ gint ok;
g_return_val_if_fail(folder != NULL, NULL);
g_return_val_if_fail(item != NULL, NULL);
@@ -1255,6 +1256,11 @@ static MsgInfo *imap_get_msginfo(Folder *folder, FolderItem *item, gint uid)
session = imap_session_get(folder);
g_return_val_if_fail(session != NULL, NULL);
+ ok = imap_select(session, IMAP_FOLDER(folder), item->path,
+ NULL, NULL, NULL, NULL);
+ if (ok != IMAP_SUCCESS)
+ return NULL;
+
list = imap_get_uncached_messages(session, item, uid, uid, 0, FALSE);
if (list) {
msginfo = (MsgInfo *)list->data;