[Libreoffice-commits] core.git: Branch 'feature/profilesafemode' - comphelper/source
Armin Le Grand
Armin.Le.Grand at cib.de
Fri Sep 30 15:57:51 UTC 2016
comphelper/source/misc/backupfilehelper.cxx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit bd630552f142a8932802871641346e8768005523
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date: Fri Sep 30 17:54:25 2016 +0200
profilesafe: Corrected error copying existing entry
Change-Id: I5a624c09fec4e4278314e13fc5f693ac085d5e61
diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx
index 5d920d8..5270306 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -103,7 +103,7 @@ namespace
{
sal_uInt8 aArray[BACKUP_FILE_HELPER_BLOCK_SIZE];
sal_uInt64 nBytesTransfer(0);
- sal_uInt64 nSize(getFullFileSize());
+ sal_uInt64 nSize(getPackFileSize());
// set offset in source file - when this is zero, a new file is to be added
if (osl::File::E_None == maFile->setPos(osl_Pos_Absolut, sal_Int64(getOffset())))
@@ -140,7 +140,7 @@ namespace
sal_uInt8 aArray[BACKUP_FILE_HELPER_BLOCK_SIZE];
sal_uInt8 aBuffer[BACKUP_FILE_HELPER_BLOCK_SIZE];
sal_uInt64 nBytesTransfer(0);
- sal_uInt64 nSize(getFullFileSize());
+ sal_uInt64 nSize(getPackFileSize());
std::unique_ptr< z_stream > zstream(new z_stream);
memset(zstream.get(), 0, sizeof(*zstream));
@@ -294,21 +294,22 @@ namespace
public:
+ // create new, uncompressed entry
PackedFileEntry(
sal_uInt32 nFullFileSize,
- sal_uInt32 nOffset,
sal_uInt32 nCrc32,
FileSharedPtr& rFile,
bool bDoCompress)
: mnFullFileSize(nFullFileSize),
mnPackFileSize(nFullFileSize),
- mnOffset(nOffset),
+ mnOffset(0),
mnCrc32(nCrc32),
maFile(rFile),
mbDoCompress(bDoCompress)
{
}
+ // create entry to be loaded as header (read_header)
PackedFileEntry()
: mnFullFileSize(0),
mnPackFileSize(0),
@@ -724,12 +725,11 @@ namespace
nCrc32 = createCrc32(rFileCandidate, 0);
}
- // create a file entry for a new file. Offset is set to 0 to mark
- // the entry as new file entry
+ // create a file entry for a new file. Offset is set automatically
+ // to 0 to mark the entry as new file entry
maPackedFileEntryVector.push_back(
PackedFileEntry(
static_cast< sal_uInt32 >(nFileSize),
- 0,
nCrc32,
rFileCandidate,
bCompress));
More information about the Libreoffice-commits
mailing list