1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-04 14:52:24 -05:00

IMAP: fix uidNext implementation

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2187 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2013-10-23 21:53:21 +00:00
parent ab4a482039
commit 2018b25768

View File

@ -1629,7 +1629,10 @@ public abstract class ExchangeSession {
recent++;
}
}
long computedUidNext = messages.get(messages.size() - 1).getImapUid() + 1;
long computedUidNext = 1;
if (!messages.isEmpty()) {
computedUidNext = messages.get(messages.size() - 1).getImapUid() + 1;
}
if (computedUidNext > uidNext) {
uidNext = computedUidNext;
}