mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 02:12:15 -05:00
adapt to a corner case for broken server.
This commit is contained in:
parent
35c79a5656
commit
b88fbb7fd8
@ -567,8 +567,13 @@ public class Pop3Store extends Store {
|
|||||||
Pop3Message message = mMsgNumToMsgMap.get(msgNum);
|
Pop3Message message = mMsgNumToMsgMap.get(msgNum);
|
||||||
if (message == null) {
|
if (message == null) {
|
||||||
String response = executeSimpleCommand(UIDL_COMMAND + " " + msgNum);
|
String response = executeSimpleCommand(UIDL_COMMAND + " " + msgNum);
|
||||||
int uidIndex = response.lastIndexOf(' ');
|
// response = "+OK msgNum msgUid"
|
||||||
String msgUid = response.substring(uidIndex + 1);
|
String[] uidParts = response.split(" +");
|
||||||
|
if (uidParts.length < 3 || !"+OK".equals(uidParts[0])) {
|
||||||
|
Log.e(K9.LOG_TAG, "ERR response: " + response);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String msgUid = uidParts[2];
|
||||||
message = new Pop3Message(msgUid, this);
|
message = new Pop3Message(msgUid, this);
|
||||||
indexMessage(msgNum, message);
|
indexMessage(msgNum, message);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user