summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-07-16 10:47:18 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-07-29 20:17:57 +0200
commita186249dc1099508add06d5f0e820c5ba66a6a2e (patch)
treeed60cad7075ea93a9302bff4a35fc5f7dc09ea6c /package
parent42ccbf2b6d7dceee4da9b845f2816a9f410100d2 (diff)
properly finish encrypting when parallel zip saving (tdf#134796)
More fixing of 353d4528b8ad8ab, that I didn't get quite right in 08161f853571e3. There must be one final processDeflated() call that has isDeflaterFinished() return true, so that encrypting is finalized properly. Change-Id: Id15190cc467a801ccc57e1efe802cdd8fc618a71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98878 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit b3c4ca3439eea5f81f3e5a98830829fa20c22823) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98837 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 14ca32ec6e0ee7fdb1d70d7db52b532e571ebd5d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98842 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'package')
-rw-r--r--package/source/zipapi/ZipOutputEntry.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/source/zipapi/ZipOutputEntry.cxx b/package/source/zipapi/ZipOutputEntry.cxx
index c9a4943cbe19..31c4bbbf8c8a 100644
--- a/package/source/zipapi/ZipOutputEntry.cxx
+++ b/package/source/zipapi/ZipOutputEntry.cxx
@@ -374,6 +374,8 @@ void ZipOutputEntryParallel::writeStream(const uno::Reference< io::XInputStream
processDeflated(rBuffer, nLen);
}
);
+ finished = true;
+ processDeflated( uno::Sequence< sal_Int8 >(), 0 ); // finish encrypting, etc.
totalIn = deflater.getTotalIn();
totalOut = deflater.getTotalOut();
closeEntry();