aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/imap/MCIMAPSession.cc
diff options
context:
space:
mode:
authorGravatar Pushkar Singh <pushkar@hothouselabs.com>2013-05-26 03:27:26 -0700
committerGravatar Pushkar Singh <pushkar@hothouselabs.com>2013-05-26 03:27:26 -0700
commitbba585af5c9a077bd3f7e081c410d2cb3d59a06d (patch)
tree733975b3da07aaf49f3c5558bda282903f50f3e5 /src/core/imap/MCIMAPSession.cc
parentc51b6d7a7941deb5fb9d0e5012ad219d9af66e43 (diff)
Select folder if there fetch messages is called for a different folder
Diffstat (limited to 'src/core/imap/MCIMAPSession.cc')
-rw-r--r--src/core/imap/MCIMAPSession.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/imap/MCIMAPSession.cc b/src/core/imap/MCIMAPSession.cc
index d860d85c..88e50aa3 100644
--- a/src/core/imap/MCIMAPSession.cc
+++ b/src/core/imap/MCIMAPSession.cc
@@ -759,7 +759,12 @@ void IMAPSession::selectIfNeeded(String * folder, ErrorCode * pError)
if (* pError != ErrorNone)
return;
- if (mState == STATE_LOGGEDIN) {
+ if (mState == STATE_SELECTED) {
+ if (mCurrentFolder != NULL && mCurrentFolder->caseInsensitiveCompare(folder) != 0) {
+ select(folder, pError);
+ }
+ }
+ else if (mState == STATE_LOGGEDIN) {
select(folder, pError);
}
else {