mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-13 20:11:35 -06:00
fix: compile error, using another way to pass down SoleFolderIndex
This commit is contained in:
@@ -685,6 +685,16 @@ STDMETHODIMP CExtractCallbackImp::CryptoGetTextPassword(BSTR *password)
|
||||
|
||||
#ifndef _SFX
|
||||
|
||||
STDMETHODIMP CExtractCallbackImp::SetSoleFolderIndex(Int64 soleFolderIndex)
|
||||
{
|
||||
this->SoleFolderIndex = soleFolderIndex;
|
||||
}
|
||||
|
||||
STDMETHODIMP CExtractCallbackImp::GetSoleFolderIndex(Int64 *pSoleFolderIndex)
|
||||
{
|
||||
(*pSoleFolderIndex) = this->SoleFolderIndex;
|
||||
}
|
||||
|
||||
STDMETHODIMP CExtractCallbackImp::AskWrite(
|
||||
const wchar_t *srcPath, Int32 srcIsFolder,
|
||||
const FILETIME *srcTime, const UInt64 *srcSize,
|
||||
|
||||
@@ -272,6 +272,8 @@ public:
|
||||
bool ThereAreMessageErrors;
|
||||
NExtract::NOverwriteMode::EEnum OverwriteMode;
|
||||
|
||||
Int64 SoleFolderIndex;
|
||||
|
||||
#ifndef _NO_CRYPTO
|
||||
bool PasswordIsDefined;
|
||||
bool PasswordWasAsked;
|
||||
@@ -296,6 +298,7 @@ public:
|
||||
ProcessAltStreams(true),
|
||||
StreamMode(false),
|
||||
OverwriteMode(NExtract::NOverwriteMode::kAsk),
|
||||
SoleFolderIndex(-1),
|
||||
#ifndef _NO_CRYPTO
|
||||
PasswordIsDefined(false),
|
||||
PasswordWasAsked(false),
|
||||
|
||||
@@ -69,6 +69,8 @@ FOLDER_INTERFACE_SUB(IFolderOperationsExtractCallback, IProgress, 0x0B)
|
||||
BSTR *destPathResult,
|
||||
Int32 *writeAnswer) PURE;
|
||||
STDMETHOD(ShowMessage)(const wchar_t *message) PURE;
|
||||
STDMETHOD(SetSoleFolderIndex)(Int64 soleFolderIndex) PURE;
|
||||
STDMETHOD(GetSoleFolderIndex)(Int64 *pSoleFolderIndex) PURE;
|
||||
STDMETHOD(SetCurrentFilePath)(const wchar_t *filePath) PURE;
|
||||
STDMETHOD(SetNumFiles)(UInt64 numFiles) PURE;
|
||||
};
|
||||
|
||||
@@ -99,12 +99,14 @@ HRESULT CPanelCopyThread::ProcessVirt()
|
||||
options->folder, BoolToInt(true), extractCallback2);
|
||||
}
|
||||
else
|
||||
CMyComPtr<IFolderArchiveExtractCallback> extractCallback2;
|
||||
RINOK(ExtractCallback.QueryInterface(IID_IFolderArchiveExtractCallback, &extractCallback2))
|
||||
extractCallback2->SetSoleFolderIndex(options->soleFolderIndex);
|
||||
result2 = FolderOperations->CopyTo(
|
||||
BoolToInt(options->moveMode),
|
||||
&Indices.Front(), Indices.Size(),
|
||||
BoolToInt(options->includeAltStreams),
|
||||
BoolToInt(options->replaceAltStreamChars),
|
||||
options->soleFolderIndex,
|
||||
options->folder, ExtractCallback);
|
||||
|
||||
if (result2 == S_OK && !ExtractCallbackSpec->ThereAreMessageErrors)
|
||||
|
||||
Reference in New Issue
Block a user