From 2879952faac68d9350f7b149fdbfa80a3bee5b9b Mon Sep 17 00:00:00 2001 From: dan Date: Tue, 16 Jan 2018 21:09:00 +0000 Subject: [PATCH] Fix a problem causing zipfile to store 0 in place of the CRC32 value for uncompressed files. FossilOrigin-Name: ba44724bcca2e87788b7c6d8c5de7fa388360127bd894ee6a171fd66e794fcae --- ext/misc/zipfile.c | 18 ++++++++++-------- manifest | 16 ++++++++-------- manifest.uuid | 2 +- test/zipfile.test | 9 +++++++++ 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/ext/misc/zipfile.c b/ext/misc/zipfile.c index 5100bc4f79..fa31d62d11 100644 --- a/ext/misc/zipfile.c +++ b/ext/misc/zipfile.c @@ -1337,14 +1337,16 @@ static int zipfileUpdate( nData = nIn; if( iMethod!=0 && iMethod!=8 ){ rc = SQLITE_CONSTRAINT; - }else if( bAuto || iMethod ){ - int nCmp; - rc = zipfileDeflate(pTab, aIn, nIn, &pFree, &nCmp); - if( rc==SQLITE_OK ){ - if( iMethod || nCmp