mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 09:14:58 -06:00
fix: compile error, using another way to pass down SoleFolderIndex
This commit is contained in:
@@ -23,7 +23,7 @@ STDMETHODIMP CAgentFolder::SetZoneIdMode(NExtract::NZoneIdMode::EEnum zoneMode)
|
||||
}
|
||||
|
||||
STDMETHODIMP CAgentFolder::CopyTo(Int32 moveMode, const UInt32 *indices, UInt32 numItems,
|
||||
Int32 includeAltStreams, Int32 replaceAltStreamCharsMode, Int64 soleFolderIndex,
|
||||
Int32 includeAltStreams, Int32 replaceAltStreamCharsMode,
|
||||
const wchar_t *path, IFolderOperationsExtractCallback *callback)
|
||||
{
|
||||
if (moveMode)
|
||||
@@ -42,6 +42,9 @@ STDMETHODIMP CAgentFolder::CopyTo(Int32 moveMode, const UInt32 *indices, UInt32
|
||||
NExtract::NPathMode::kNoPathsAlt :
|
||||
NExtract::NPathMode::kNoPaths;
|
||||
|
||||
Int64 soleFolderIndex;
|
||||
extractCallback2->GetSoleFolderIndex(&soleFolderIndex);
|
||||
|
||||
return Extract(indices, numItems,
|
||||
includeAltStreams, replaceAltStreamCharsMode,
|
||||
soleFolderIndex,
|
||||
|
||||
@@ -28,7 +28,6 @@ IArchiveFolder is used by:
|
||||
STDMETHOD(Extract)(const UInt32 *indices, UInt32 numItems, \
|
||||
Int32 includeAltStreams, \
|
||||
Int32 replaceAltStreamCharsMode, \
|
||||
Int64 soleFolderIndex, \
|
||||
NExtract::NPathMode::EEnum pathMode, \
|
||||
NExtract::NOverwriteMode::EEnum overwriteMode, \
|
||||
const wchar_t *path, Int32 testMode, \
|
||||
|
||||
@@ -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