From 469bd13a28a67d62c4c4acd83189e2bfbc2f7064 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 3 Nov 2016 14:42:07 +0100 Subject: [PATCH] Changed: Use QSaveFile to be sure the file is fully written --HG-- branch : develop --- .../tools/client/ryzom_installer/src/filesextractor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/filesextractor.cpp b/code/ryzom/tools/client/ryzom_installer/src/filesextractor.cpp index 241817e9c..d314dce93 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/filesextractor.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/filesextractor.cpp @@ -462,7 +462,7 @@ bool CFilesExtractor::extract7z() } // create file - QFile outFile(destPath); + QSaveFile outFile(destPath); if (!outFile.open(QFile::WriteOnly)) { @@ -496,7 +496,7 @@ bool CFilesExtractor::extract7z() break; } - outFile.close(); + outFile.commit(); totalUncompressed += uncompressedSize; @@ -620,7 +620,7 @@ bool CFilesExtractor::extractZip() return true; } - QFile f(absPath); + QSaveFile f(absPath); if (!f.open(QIODevice::WriteOnly)) { @@ -637,7 +637,7 @@ bool CFilesExtractor::extractZip() nlwarning("Unable to change permissions of %s", Q2C(absPath)); } - f.close(); + f.commit(); // set the right modification date if (!NLMISC::CFile::setFileModificationDate(qToUtf8(absPath), fi.lastModified.toTime_t()))