mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-17 07:30:16 -05:00
Reset mMessageCount before executing SELECT. Only handle untagged
responses to SELECT once.
This commit is contained in:
parent
f0f07c36de
commit
d1661ee1f5
@ -386,10 +386,11 @@ public class ImapStore extends Store {
|
||||
}
|
||||
String command = String.format("SELECT \"%s\"",
|
||||
encodeFolderName(getPrefixedName()));
|
||||
|
||||
|
||||
mMessageCount = -1;
|
||||
|
||||
List<ImapResponse> responses = executeSimpleCommand(command);
|
||||
|
||||
mMessageCount = -1;
|
||||
/*
|
||||
* If the command succeeds we expect the folder has been opened read-write
|
||||
* unless we are notified otherwise in the responses.
|
||||
@ -397,7 +398,6 @@ public class ImapStore extends Store {
|
||||
mMode = OpenMode.READ_WRITE;
|
||||
|
||||
for (ImapResponse response : responses) {
|
||||
handleUntaggedResponse(response);
|
||||
if (response.mTag != null && response.size() >= 2) {
|
||||
if ("[READ-ONLY]".equalsIgnoreCase(response.getString(1))) {
|
||||
mMode = OpenMode.READ_ONLY;
|
||||
|
Loading…
Reference in New Issue
Block a user