mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 11:12: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");
|
sendClient(commandId + " OK STORE completed");
|
||||||
} else if ("copy".equalsIgnoreCase(subcommand)) {
|
} else if ("copy".equalsIgnoreCase(subcommand)) {
|
||||||
long uid = Long.parseLong(tokens.nextToken());
|
|
||||||
ExchangeSession.Message message = messages.getByUid(uid);
|
|
||||||
String targetName = BASE64MailboxDecoder.decode(tokens.nextToken());
|
|
||||||
try {
|
try {
|
||||||
session.copyMessage(message.messageUrl, targetName);
|
long uid = Long.parseLong(tokens.nextToken());
|
||||||
sendClient(commandId + " OK rename completed");
|
ExchangeSession.Message message = messages.getByUid(uid);
|
||||||
} catch (HttpException e) {
|
String targetName = BASE64MailboxDecoder.decode(tokens.nextToken());
|
||||||
sendClient(commandId + " NO " + e.getReason());
|
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 {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user