From e76e0f5d5729dae178689db8899c00d4a408571f Mon Sep 17 00:00:00 2001 From: shunf4 Date: Fri, 10 May 2024 19:40:20 +0800 Subject: [PATCH] fix: SoleFolderIndex: continue fixing method decl/impl --- CPP/7zip/UI/Agent/ArchiveFolder.cpp | 2 +- CPP/7zip/UI/Agent/IFolderArchive.h | 1 + CPP/7zip/UI/FileManager/PanelCopy.cpp | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CPP/7zip/UI/Agent/ArchiveFolder.cpp b/CPP/7zip/UI/Agent/ArchiveFolder.cpp index a7ec1ed2..2582f7a9 100755 --- a/CPP/7zip/UI/Agent/ArchiveFolder.cpp +++ b/CPP/7zip/UI/Agent/ArchiveFolder.cpp @@ -44,7 +44,7 @@ Z7_COM7F_IMF(CAgentFolder::CopyTo(Int32 moveMode, const UInt32 *indices, UInt32 NExtract::NPathMode::kNoPaths; Int64 soleFolderIndex; - extractCallback2->GetSoleFolderIndex(&soleFolderIndex); + callback->GetSoleFolderIndex(&soleFolderIndex); return Extract(indices, numItems, includeAltStreams, replaceAltStreamCharsMode, diff --git a/CPP/7zip/UI/Agent/IFolderArchive.h b/CPP/7zip/UI/Agent/IFolderArchive.h index 55f14234..79ceff02 100755 --- a/CPP/7zip/UI/Agent/IFolderArchive.h +++ b/CPP/7zip/UI/Agent/IFolderArchive.h @@ -27,6 +27,7 @@ IArchiveFolder is used by: x(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, \ diff --git a/CPP/7zip/UI/FileManager/PanelCopy.cpp b/CPP/7zip/UI/FileManager/PanelCopy.cpp index e157d1f9..9ab3ab04 100755 --- a/CPP/7zip/UI/FileManager/PanelCopy.cpp +++ b/CPP/7zip/UI/FileManager/PanelCopy.cpp @@ -109,9 +109,9 @@ HRESULT CPanelCopyThread::ProcessVirt() options->folder, BoolToInt(true), extractCallback2); } else - CMyComPtr extractCallback2; - RINOK(ExtractCallback.QueryInterface(IID_IFolderArchiveExtractCallback, &extractCallback2)) - extractCallback2->SetSoleFolderIndex(options->soleFolderIndex); + // CMyComPtr extractCallback2; + // RINOK(ExtractCallback.QueryInterface(IID_IFolderArchiveExtractCallback, &extractCallback2)) + ExtractCallback->SetSoleFolderIndex(options->soleFolderIndex); result2 = FolderOperations->CopyTo( BoolToInt(options->moveMode), &Indices.Front(), Indices.Size(),