mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Merge with develop
--HG-- branch : compatibility-develop
This commit is contained in:
commit
35cdaab027
1 changed files with 17 additions and 7 deletions
|
@ -434,20 +434,30 @@ bool CFilesExtractor::extract7z()
|
||||||
|
|
||||||
if (!outFile.open(QFile::WriteOnly))
|
if (!outFile.open(QFile::WriteOnly))
|
||||||
{
|
{
|
||||||
error = QApplication::tr("Unable to open output file");
|
error = QApplication::tr("Unable to open output file %1").arg(destPath);
|
||||||
res = SZ_ERROR_FAIL;
|
res = SZ_ERROR_FAIL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t processedSize = outFile.write((const char*)(outBuffer + offset), outSizeProcessed);
|
qint64 currentSizeToProcess = outSizeProcessed;
|
||||||
|
|
||||||
if (processedSize != outSizeProcessed)
|
do
|
||||||
{
|
{
|
||||||
error = QApplication::tr("Unable to write output file");
|
qint64 currentProcessedSize = outFile.write((const char*)(outBuffer + offset), currentSizeToProcess);
|
||||||
|
|
||||||
|
// errors only occur when returned size is -1
|
||||||
|
if (currentProcessedSize < 0)
|
||||||
|
{
|
||||||
|
error = QApplication::tr("Unable to write output file %1").arg(destPath);
|
||||||
res = SZ_ERROR_FAIL;
|
res = SZ_ERROR_FAIL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
offset += currentProcessedSize;
|
||||||
|
currentSizeToProcess -= currentProcessedSize;
|
||||||
|
}
|
||||||
|
while (currentSizeToProcess > 0);
|
||||||
|
|
||||||
outFile.close();
|
outFile.close();
|
||||||
|
|
||||||
totalUncompressed += SzArEx_GetFileSize(&db, i);
|
totalUncompressed += SzArEx_GetFileSize(&db, i);
|
||||||
|
|
Loading…
Reference in a new issue