mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-24 18:08:44 +00:00
Changed: Check written bytes at each step and at the end
--HG-- branch : develop
This commit is contained in:
parent
508a6723a2
commit
bf8d9aef12
1 changed files with 7 additions and 2 deletions
|
@ -448,8 +448,6 @@ bool CFilesExtractor::extract7z()
|
||||||
// errors only occur when returned size is -1
|
// errors only occur when returned size is -1
|
||||||
if (currentProcessedSize < 0)
|
if (currentProcessedSize < 0)
|
||||||
{
|
{
|
||||||
error = QApplication::tr("Unable to write output file %1").arg(destPath);
|
|
||||||
res = SZ_ERROR_FAIL;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,6 +456,13 @@ bool CFilesExtractor::extract7z()
|
||||||
}
|
}
|
||||||
while (currentSizeToProcess > 0);
|
while (currentSizeToProcess > 0);
|
||||||
|
|
||||||
|
if (offset != outSizeProcessed)
|
||||||
|
{
|
||||||
|
error = QApplication::tr("Unable to write output file %1 (%2 bytes written but expecting %3 bytes)").arg(destPath).arg(offset).arg(outSizeProcessed);
|
||||||
|
res = SZ_ERROR_FAIL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
outFile.close();
|
outFile.close();
|
||||||
|
|
||||||
totalUncompressed += SzArEx_GetFileSize(&db, i);
|
totalUncompressed += SzArEx_GetFileSize(&db, i);
|
||||||
|
|
Loading…
Reference in a new issue