mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-28 02:37:16 +00:00
Unzip: improved error handling
This commit is contained in:
parent
e70fae3478
commit
153b6c8c53
1 changed files with 6 additions and 1 deletions
|
@ -52,6 +52,7 @@ import com.sun.mail.util.MessageRemovedIOException;
|
|||
import org.apache.commons.compress.archivers.ArchiveEntry;
|
||||
import org.apache.commons.compress.archivers.ArchiveInputStream;
|
||||
import org.apache.commons.compress.archivers.ArchiveStreamFactory;
|
||||
import org.apache.commons.compress.archivers.zip.UnsupportedZipFeatureException;
|
||||
import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
|
@ -3528,7 +3529,11 @@ public class MessageHelper {
|
|||
}
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
db.attachment().setWarning(local.id, Log.formatThrowable(ex));
|
||||
// Unsupported feature encryption used in entry ...
|
||||
if (ex instanceof UnsupportedZipFeatureException)
|
||||
db.attachment().setWarning(local.id, ex.getMessage());
|
||||
else
|
||||
db.attachment().setWarning(local.id, Log.formatThrowable(ex));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue