1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

Restore ability to delete server-side messages for POP3 and WebDAV

This commit is contained in:
Daniel Applebaum 2009-03-05 13:43:05 +00:00
parent 014691bac9
commit 6d5b158787

View File

@ -1437,12 +1437,6 @@ s * critical data as fast as possible, and then we'll fill in the de
return;
}
remoteDestFolder.open(OpenMode.READ_WRITE);
if (remoteDestFolder.getMode() != OpenMode.READ_WRITE) {
Log.w(Email.LOG_TAG, "processingPendingMoveOrCopy: could not open remoteDestFolder " + srcFolder + " read/write");
return;
}
Message remoteMessage = null;
if (!uid.startsWith("Local")
&& !uid.contains("-")) {
@ -1454,11 +1448,24 @@ s * critical data as fast as possible, and then we'll fill in the de
Log.w(Email.LOG_TAG, "processingPendingMoveOrCopy: remoteMessage " + uid + " does not exist");
return;
}
if (Config.LOGD)
{
Log.d(Email.LOG_TAG, "processingPendingMoveOrCopy: source folder = " + srcFolder
+ ", uid = " + uid + ", destination folder = " + destFolder + ", isCopy = " + isCopy);
}
if (isCopy == false && destFolder.equals(account.getTrashFolderName()))
{
Log.d(Email.LOG_TAG, "processingPendingMoveOrCopy doing special case for deleting message");
remoteMessage.delete(account.getTrashFolderName());
return;
}
remoteDestFolder.open(OpenMode.READ_WRITE);
if (remoteDestFolder.getMode() != OpenMode.READ_WRITE) {
Log.w(Email.LOG_TAG, "processingPendingMoveOrCopy: could not open remoteDestFolder " + srcFolder + " read/write");
return;
}
if (isCopy) {
remoteSrcFolder.copyMessages(new Message[] { remoteMessage }, remoteDestFolder);