mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-20 22:31:23 +01:00
fixed GH #1239: Poco::Zip::Compress with non-seekable stream fails for CM_STORE
Conflicts: Zip/src/ZipLocalFileHeader.cpp
This commit is contained in:
parent
6a9317cb09
commit
8fd1065804
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user