summaryrefslogtreecommitdiff
path: root/package/source/zippackage/ZipPackageStream.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'package/source/zippackage/ZipPackageStream.cxx')
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index d684493d4617..7f54260bba40 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -520,15 +520,14 @@ bool ZipPackageStream::saveChild(
uno::Sequence < beans::PropertyValue > aPropSet (PKG_SIZE_NOENCR_MNFST);
+ // In case the entry we are reading is also the entry we are writing, we will
+ // store the ZipEntry data in pTempEntry
+
// if pTempEntry is necessary, it will be released and passed to the ZipOutputStream
// and be deleted in the ZipOutputStream destructor
- std::unique_ptr < ZipEntry > pAutoTempEntry ( new ZipEntry );
+ std::unique_ptr < ZipEntry > pAutoTempEntry ( new ZipEntry(aEntry) );
ZipEntry* pTempEntry = pAutoTempEntry.get();
- // In case the entry we are reading is also the entry we are writing, we will
- // store the ZipEntry data in pTempEntry
-
- ZipPackageFolder::copyZipEntry ( *pTempEntry, aEntry );
pTempEntry->sPath = rPath;
pTempEntry->nPathLen = (sal_Int16)( OUStringToOString( pTempEntry->sPath, RTL_TEXTENCODING_UTF8 ).getLength() );
@@ -904,7 +903,7 @@ void ZipPackageStream::successfullyWritten( ZipEntry *pEntry )
}
// Then copy it back afterwards...
- ZipPackageFolder::copyZipEntry( aEntry, *pEntry );
+ aEntry = *pEntry;
// TODO/LATER: get rid of this hack ( the encrypted stream size property is changed during saving )
if ( m_bIsEncrypted )