Unzip: improved error handling

pull/207/head
M66B 3 years ago
parent e70fae3478
commit 153b6c8c53

@ -52,6 +52,7 @@ import com.sun.mail.util.MessageRemovedIOException;
import org.apache.commons.compress.archivers.ArchiveEntry; import org.apache.commons.compress.archivers.ArchiveEntry;
import org.apache.commons.compress.archivers.ArchiveInputStream; import org.apache.commons.compress.archivers.ArchiveInputStream;
import org.apache.commons.compress.archivers.ArchiveStreamFactory; 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.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
@ -3528,6 +3529,10 @@ public class MessageHelper {
} }
} catch (Throwable ex) { } catch (Throwable ex) {
Log.e(ex); Log.e(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)); db.attachment().setWarning(local.id, Log.formatThrowable(ex));
} }
} }

Loading…
Cancel
Save