mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 13:12:25 -05:00
Delete needs to know how to use Imap prefix
This commit is contained in:
parent
7d5d29e078
commit
d0a354ead0
@ -498,6 +498,10 @@ public class ImapStore extends Store {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void copyMessages(Message[] messages, Folder folder) throws MessagingException {
|
public void copyMessages(Message[] messages, Folder folder) throws MessagingException {
|
||||||
|
if (folder instanceof ImapFolder == false) {
|
||||||
|
throw new MessagingException("ImapFolder.copyMessages passed non-ImapFolder");
|
||||||
|
}
|
||||||
|
ImapFolder iFolder = (ImapFolder)folder;
|
||||||
checkOpen();
|
checkOpen();
|
||||||
String[] uids = new String[messages.length];
|
String[] uids = new String[messages.length];
|
||||||
for (int i = 0, count = messages.length; i < count; i++) {
|
for (int i = 0, count = messages.length; i < count; i++) {
|
||||||
@ -506,7 +510,7 @@ public class ImapStore extends Store {
|
|||||||
try {
|
try {
|
||||||
mConnection.executeSimpleCommand(String.format("UID COPY %s \"%s\"",
|
mConnection.executeSimpleCommand(String.format("UID COPY %s \"%s\"",
|
||||||
Utility.combine(uids, ','),
|
Utility.combine(uids, ','),
|
||||||
encodeFolderName(folder.getName())));
|
encodeFolderName(iFolder.getPrefixedName())));
|
||||||
}
|
}
|
||||||
catch (IOException ioe) {
|
catch (IOException ioe) {
|
||||||
throw ioExceptionHandler(mConnection, ioe);
|
throw ioExceptionHandler(mConnection, ioe);
|
||||||
@ -1360,7 +1364,7 @@ public class ImapStore extends Store {
|
|||||||
responses.add(response);
|
responses.add(response);
|
||||||
} while (response.mTag == null);
|
} while (response.mTag == null);
|
||||||
if (response.size() < 1 || !response.get(0).equals("OK")) {
|
if (response.size() < 1 || !response.get(0).equals("OK")) {
|
||||||
throw new ImapException(response.toString(), response.getAlertText());
|
throw new ImapException("Command: " + command + "; response: " + response.toString(), response.getAlertText());
|
||||||
}
|
}
|
||||||
return responses;
|
return responses;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user