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

Conflicts:
	Zip/src/ZipLocalFileHeader.cpp
This commit is contained in:
Guenter Obiltschnig 2016-04-14 18:25:30 +02:00
parent 6a9317cb09
commit 8fd1065804

View File

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