Skip folders with a messaging exception

pull/147/head
M66B 6 years ago
parent 6328d53215
commit d2961dbf75

@ -940,6 +940,11 @@ public class ServiceSynchronize extends LifecycleService {
final IMAPFolder ifolder = (IMAPFolder) istore.getFolder(folder.name);
try {
ifolder.open(Folder.READ_WRITE);
} catch (MessagingException ex) {
// Including ReadOnlyFolderException
db.folder().setFolderState(folder.id, null);
db.folder().setFolderError(folder.id, Helper.formatThrowable(ex));
continue;
} catch (Throwable ex) {
db.folder().setFolderError(folder.id, Helper.formatThrowable(ex));
throw ex;

Loading…
Cancel
Save