fixed GH #1239: Poco::Zip::Compress with non-seekable stream fails for CM_STORE

This commit is contained in:
Guenter Obiltschnig 2016-04-14 18:25:30 +02:00
parent 0c91f8714d
commit 839b2def04

View File

@ -149,7 +149,7 @@ void ZipLocalFileHeader::parse(std::istream& inp, bool assumeHeaderRead)
bool ZipLocalFileHeader::searchCRCAndSizesAfterData() const
{
if (getCompressionMethod() == ZipCommon::CM_DEFLATE)
if (getCompressionMethod() == ZipCommon::CM_STORE || getCompressionMethod() == ZipCommon::CM_DEFLATE)
{
// check bit 3
return ((ZipUtil::get16BitValue(_rawHeader, GENERAL_PURPOSE_POS) & 0x0008) != 0);