From 82b71e04a1594755d345d227181642c491518e18 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 15 Dec 2011 12:30:13 +0100 Subject: Revert "Fix n#653688" This reverts commit 309f56174aca6adca879f70958892492361dac6e. It caused password-protected documents to no longer work and made sc_subsequent_filters_test's testPassword fail. --- package/source/zipapi/ZipFile.cxx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'package/source') diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index 8317745b19bc..ef801f205813 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -688,7 +688,7 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry ) // check basic local file header / entry consistency bBroken = rEntry.nVersion != nVersion - || rEntry.nMethod != nHow + || rEntry.nFlag != nFlag || rEntry.nTime != nTime || rEntry.nPathLen != nPathLen || !rEntry.sPath.equals( sLOCPath ); @@ -698,12 +698,6 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry ) bBroken = sal_True; } - // ignore bits 1 & 2 for normal deflate algo - they're purely informative - if( nHow != 8 && nHow != 9 ) - bBroken = bBroken || rEntry.nFlag != nFlag; - else if( (rEntry.nFlag & ~6L) != (nFlag & ~6L) ) - bBroken = true; - if ( bBroken && !bRecoveryMode ) throw ZipIOException( OUString( RTL_CONSTASCII_USTRINGPARAM( "The stream seems to be broken!" ) ), uno::Reference< XInterface >() ); -- cgit