diff options
Diffstat (limited to 'libsylph/imap.c')
-rw-r--r-- | libsylph/imap.c | 6 |
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; |