From 3f87184c7cc4e43336b559e92e9ffdb3a345b5cc Mon Sep 17 00:00:00 2001 From: mguessan Date: Wed, 2 Jun 2010 22:32:28 +0000 Subject: [PATCH] IMAP: implement last message (simple *) fetch range git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1071 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/imap/ImapConnection.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/java/davmail/imap/ImapConnection.java b/src/java/davmail/imap/ImapConnection.java index 54cce143..478cf789 100644 --- a/src/java/davmail/imap/ImapConnection.java +++ b/src/java/davmail/imap/ImapConnection.java @@ -1436,6 +1436,8 @@ public class ImapConnection extends AbstractConnection { endUid = startUid; startUid = swap; } + } else if ("*".equals(currentRange)){ + startUid = endUid = messages.get(messages.size()-1).getImapUid(); } else { startUid = endUid = convertToLong(currentRange); } @@ -1517,6 +1519,8 @@ public class ImapConnection extends AbstractConnection { endUid = startUid; startUid = swap; } + } else if ("*".equals(currentRange)){ + startUid = endUid = messages.size(); } else { startUid = endUid = convertToLong(currentRange); }