Reset attachment download on all errors

This commit is contained in:
M66B 2019-06-06 10:39:56 +02:00
parent db931c6f6f
commit fb575b3a53
1 changed files with 2 additions and 0 deletions

View File

@ -926,8 +926,10 @@ public class MessageHelper {
Log.i("Downloaded attachment size=" + size);
} catch (FolderClosedIOException ex) {
db.attachment().setError(id, Helper.formatThrowable(ex));
throw new FolderClosedException(ex.getFolder(), "downloadAttachment", ex);
} catch (MessageRemovedIOException ex) {
db.attachment().setError(id, Helper.formatThrowable(ex));
throw new MessagingException("downloadAttachment", ex);
} catch (Throwable ex) {
// Reset progress on failure