mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
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;
|
return entry;
|
||||||
} catch (ZipException ze) {
|
} 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(
|
throw new NotOfficeXmlFileException(
|
||||||
"No valid entries or contents found, this is not a valid OOXML (Office Open XML) file", ze);
|
"No valid entries or contents found, this is not a valid OOXML (Office Open XML) file", ze);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user