Get rid of accidentally created "-NONE-" folder

This commit is contained in:
cketti 2013-03-31 01:13:09 +01:00
parent f95e64f766
commit 33a2b05701
1 changed files with 9 additions and 1 deletions

View File

@ -641,7 +641,15 @@ public class MessagingController implements Runnable {
*/
for (Folder localFolder : localFolders) {
String localFolderName = localFolder.getName();
if (!account.isSpecialFolder(localFolderName) && !remoteFolderNames.contains(localFolderName)) {
// FIXME: This is a hack used to clean up when we accidentally created the
// special placeholder folder "-NONE-".
if (K9.FOLDER_NONE.equals(localFolderName)) {
localFolder.delete(false);
}
if (!account.isSpecialFolder(localFolderName) &&
!remoteFolderNames.contains(localFolderName)) {
localFolder.delete(false);
}
}