mirror of https://github.com/apache/poi.git
try to fix issue with invalid files after commons-compress upgrade
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1915895 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fded4957db
commit
3817f138f8
|
@ -155,7 +155,9 @@ public class ZipArchiveThresholdInputStream extends FilterInputStream {
|
|||
}
|
||||
return entry;
|
||||
} catch (ZipException ze) {
|
||||
if (ze.getMessage().startsWith("Unexpected record signature")) {
|
||||
final String msg = ze.getMessage();
|
||||
if (msg.startsWith("Unexpected record signature")
|
||||
|| msg.startsWith("Cannot find zip signature within the file")) {
|
||||
throw new NotOfficeXmlFileException(
|
||||
"No valid entries or contents found, this is not a valid OOXML (Office Open XML) file", ze);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue