LZMA_IO_ERROR was returned instead of LZMA_THREAD_ERROR
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3879 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
6de9916400
commit
8557bafca2
1 changed files with 8 additions and 4 deletions
|
@ -221,13 +221,15 @@ int CLZMA::CompressReal()
|
|||
try
|
||||
{
|
||||
HRESULT hResult = _encoder->WriteCoderProperties(this);
|
||||
if (res == S_OK)
|
||||
if (hResult == S_OK)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
UINT64 inSize, outSize;
|
||||
INT32 finished;
|
||||
res = ConvertError(_encoder->CodeOneBlock(&inSize, &outSize, &finished));
|
||||
hResult = _encoder->CodeOneBlock(&inSize, &outSize, &finished);
|
||||
if (hResult != S_OK && res == C_OK)
|
||||
res = ConvertError(hResult);
|
||||
if (res != C_OK)
|
||||
break;
|
||||
if (finished)
|
||||
|
@ -239,12 +241,14 @@ int CLZMA::CompressReal()
|
|||
}
|
||||
else
|
||||
{
|
||||
res = ConvertError(hResult);
|
||||
if (res == C_OK)
|
||||
res = ConvertError(hResult);
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
res = LZMA_IO_ERROR;
|
||||
if (res == C_OK)
|
||||
res = LZMA_IO_ERROR;
|
||||
}
|
||||
|
||||
compressor_finished = TRUE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue