1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-04 06:20:26 +00:00

Double check if folder exists on op error

This commit is contained in:
M66B 2022-02-17 23:13:25 +01:00
parent 721be14b4d
commit 2919ca93bb

View file

@ -1998,9 +1998,11 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
} catch (Throwable ex) {
Log.e(folder.name, ex);
EntityLog.log(ServiceSynchronize.this, EntityLog.Type.Account, folder,
account.name + "/" + folder.name + " process " + Log.formatThrowable(ex, false));
account.name + "/" + folder.name + " process " + ex + "\n" + android.util.Log.getStackTraceString(ex));
db.folder().setFolderError(folder.id, Log.formatThrowable(ex));
if (!(ex instanceof FolderNotFoundException))
// NO Mailbox doesn't exist
if (!(ex instanceof FolderNotFoundException) &&
iservice.getStore().getFolder(folder.name).exists())
state.error(new Core.OperationCanceledExceptionEx("Process", ex));
} finally {
if (shouldClose) {