Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/UI/Agent/ArchiveFolder.cpp')
-rwxr-xr-xCPP/7zip/UI/Agent/ArchiveFolder.cpp33
1 files changed, 3 insertions, 30 deletions
diff --git a/CPP/7zip/UI/Agent/ArchiveFolder.cpp b/CPP/7zip/UI/Agent/ArchiveFolder.cpp
index 57975e7d..237afa05 100755
--- a/CPP/7zip/UI/Agent/ArchiveFolder.cpp
+++ b/CPP/7zip/UI/Agent/ArchiveFolder.cpp
@@ -8,46 +8,20 @@
#include "Agent.h"
-using namespace NWindows;
-using namespace NCOM;
-
STDMETHODIMP CAgentFolder::CopyTo(const UInt32 *indices, UInt32 numItems,
const wchar_t *path, IFolderOperationsExtractCallback *callback)
{
COM_TRY_BEGIN
- CArchiveExtractCallback *extractCallbackSpec = new
- CArchiveExtractCallback;
- CMyComPtr<IArchiveExtractCallback> extractCallback = extractCallbackSpec;
- UStringVector pathParts;
- CProxyFolder *currentProxyFolder = _proxyFolderItem;
- while (currentProxyFolder->Parent)
- {
- pathParts.Insert(0, currentProxyFolder->Name);
- currentProxyFolder = currentProxyFolder->Parent;
- }
-
CMyComPtr<IFolderArchiveExtractCallback> extractCallback2;
{
CMyComPtr<IFolderOperationsExtractCallback> callbackWrap = callback;
- RINOK(callbackWrap.QueryInterface(
- IID_IFolderArchiveExtractCallback, &extractCallback2));
+ RINOK(callbackWrap.QueryInterface(IID_IFolderArchiveExtractCallback, &extractCallback2));
}
-
NExtract::NPathMode::EEnum pathMode = _flatMode ?
NExtract::NPathMode::kNoPathnames :
NExtract::NPathMode::kCurrentPathnames;
-
- extractCallbackSpec->InitForMulti(false, pathMode, NExtract::NOverwriteMode::kAskBefore);
- extractCallbackSpec->Init(NULL, &_agentSpec->GetArc(),
- extractCallback2,
- false, false, false,
- path,
- pathParts,
- (UInt64)(Int64)-1);
- CUIntVector realIndices;
- GetRealIndices(indices, numItems, realIndices);
- return _agentSpec->GetArchive()->Extract(&realIndices.Front(),
- realIndices.Size(), BoolToInt(false), extractCallback);
+ return Extract(indices,numItems, pathMode, NExtract::NOverwriteMode::kAskBefore,
+ path, BoolToInt(false), extractCallback2);
COM_TRY_END
}
@@ -56,4 +30,3 @@ STDMETHODIMP CAgentFolder::MoveTo(const UInt32 * /* indices */, UInt32 /* numIte
{
return E_NOTIMPL;
}
-