diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2009-08-17 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:16:00 +0300 |
commit | c99f3ebdd639c2adb03d8b44001b10af18516504 (patch) | |
tree | 92aaf34e5edbd7287c3f55037190da75ab0a8000 /CPP/7zip/Archive/MubHandler.cpp | |
parent | 829409452d85cd6dd9dfc9151f109d6e13a2bb1c (diff) |
9.06 beta
Diffstat (limited to 'CPP/7zip/Archive/MubHandler.cpp')
-rwxr-xr-x | CPP/7zip/Archive/MubHandler.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/CPP/7zip/Archive/MubHandler.cpp b/CPP/7zip/Archive/MubHandler.cpp index f099aad2..da4df24c 100755 --- a/CPP/7zip/Archive/MubHandler.cpp +++ b/CPP/7zip/Archive/MubHandler.cpp @@ -187,12 +187,11 @@ STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) return S_OK; } -STDMETHODIMP CHandler::Extract(const UInt32* indices, UInt32 numItems, - Int32 _aTestMode, IArchiveExtractCallback *extractCallback) +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) { COM_TRY_BEGIN - bool testMode = (_aTestMode != 0); - bool allFilesMode = (numItems == UInt32(-1)); + bool allFilesMode = (numItems == (UInt32)-1); if (allFilesMode) numItems = _numItems; if (numItems == 0) @@ -222,19 +221,19 @@ STDMETHODIMP CHandler::Extract(const UInt32* indices, UInt32 numItems, RINOK(lps->SetCur()); CMyComPtr<ISequentialOutStream> realOutStream; Int32 askMode = testMode ? - NArchive::NExtract::NAskMode::kTest : - NArchive::NExtract::NAskMode::kExtract; + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; UInt32 index = allFilesMode ? i : indices[i]; const CItem &item = _items[index]; RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); currentTotalSize += item.Size; - if (!testMode && (!realOutStream)) + if (!testMode && !realOutStream) continue; RINOK(extractCallback->PrepareOperation(askMode)); if (testMode) { - RINOK(extractCallback->SetOperationResult(NArchive::NExtract::NOperationResult::kOK)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); continue; } RINOK(_stream->Seek(_startPos + item.Offset, STREAM_SEEK_SET, NULL)); @@ -242,8 +241,8 @@ STDMETHODIMP CHandler::Extract(const UInt32* indices, UInt32 numItems, RINOK(copyCoder->Code(inStream, realOutStream, NULL, NULL, progress)); realOutStream.Release(); RINOK(extractCallback->SetOperationResult((copyCoderSpec->TotalSize == item.Size) ? - NArchive::NExtract::NOperationResult::kOK: - NArchive::NExtract::NOperationResult::kDataError)); + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kDataError)); } return S_OK; COM_TRY_END |