mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 03:02:22 -05:00
Fail gracefully on multiple messages delete
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@318 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
ad851bc6ce
commit
fb414a9955
@ -349,14 +349,18 @@ public class ImapConnection extends AbstractConnection {
|
||||
}
|
||||
sendClient(commandId + " OK STORE completed");
|
||||
} else if ("copy".equalsIgnoreCase(subcommand)) {
|
||||
long uid = Long.parseLong(tokens.nextToken());
|
||||
ExchangeSession.Message message = messages.getByUid(uid);
|
||||
String targetName = BASE64MailboxDecoder.decode(tokens.nextToken());
|
||||
try {
|
||||
session.copyMessage(message.messageUrl, targetName);
|
||||
sendClient(commandId + " OK rename completed");
|
||||
} catch (HttpException e) {
|
||||
sendClient(commandId + " NO " + e.getReason());
|
||||
long uid = Long.parseLong(tokens.nextToken());
|
||||
ExchangeSession.Message message = messages.getByUid(uid);
|
||||
String targetName = BASE64MailboxDecoder.decode(tokens.nextToken());
|
||||
try {
|
||||
session.copyMessage(message.messageUrl, targetName);
|
||||
sendClient(commandId + " OK copy completed");
|
||||
} catch (HttpException e) {
|
||||
sendClient(commandId + " NO " + e.getReason());
|
||||
}
|
||||
} catch (NumberFormatException nfe) {
|
||||
sendClient(commandId + " NO unable to copy multiple messages");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user