fixed GH #2188: handle directory entries stored with DEFLATE compression method

This commit is contained in:
Günter Obiltschnig
2018-03-06 12:44:40 +01:00
parent 20f9320f2d
commit 27dc684d77
3 changed files with 9 additions and 2 deletions

View File

@@ -300,7 +300,7 @@ inline bool ZipFileInfo::isFile() const
inline bool ZipFileInfo::isDirectory() const
{
poco_assert_dbg(!_fileName.empty());
return getUncompressedSize() == 0 && getCompressionMethod() == ZipCommon::CM_STORE && _fileName[_fileName.length()-1] == '/';
return getUncompressedSize() == 0 && _fileName[_fileName.length()-1] == '/';
}

View File

@@ -464,7 +464,7 @@ inline bool ZipLocalFileHeader::isFile() const
inline bool ZipLocalFileHeader::isDirectory() const
{
poco_assert_dbg(!_fileName.empty());
return getUncompressedSize() == 0 && getCompressionMethod() == ZipCommon::CM_STORE && _fileName[_fileName.length()-1] == '/';
return getUncompressedSize() == 0 && _fileName[_fileName.length()-1] == '/';
}