Update to 7-Zip Version 21.02

This commit is contained in:
Tino Reichardt
2021-05-13 16:39:14 +02:00
parent 3724ecfedc
commit 48fa49f76c
620 changed files with 35032 additions and 10925 deletions

View File

@@ -31,14 +31,14 @@ public:
CHashBundle Hash;
// UString FirstFilePath;
HRESULT Result;
// HRESULT Result2;
void ShowFinalResults(HWND hwnd);
CPanelCopyThread():
Result(E_FAIL),
ResultsWereShown(false),
NeedShowRes(false)
// , Result2(E_FAIL)
{}
};
@@ -68,6 +68,8 @@ HRESULT CPanelCopyThread::ProcessVirt()
}
*/
HRESULT result2;
if (options->testMode)
{
CMyComPtr<IArchiveFolder> archiveFolder;
@@ -79,21 +81,21 @@ HRESULT CPanelCopyThread::ProcessVirt()
NExtract::NPathMode::EEnum pathMode =
NExtract::NPathMode::kCurPaths;
// NExtract::NPathMode::kFullPathnames;
Result = archiveFolder->Extract(&Indices.Front(), Indices.Size(),
result2 = archiveFolder->Extract(&Indices.Front(), Indices.Size(),
BoolToInt(options->includeAltStreams),
BoolToInt(options->replaceAltStreamChars),
pathMode, NExtract::NOverwriteMode::kAsk,
options->folder, BoolToInt(true), extractCallback2);
}
else
Result = FolderOperations->CopyTo(
result2 = FolderOperations->CopyTo(
BoolToInt(options->moveMode),
&Indices.Front(), Indices.Size(),
BoolToInt(options->includeAltStreams),
BoolToInt(options->replaceAltStreamChars),
options->folder, ExtractCallback);
if (Result == S_OK && !ExtractCallbackSpec->ThereAreMessageErrors)
if (result2 == S_OK && !ExtractCallbackSpec->ThereAreMessageErrors)
{
if (!options->hashMethods.IsEmpty())
NeedShowRes = true;
@@ -104,7 +106,7 @@ HRESULT CPanelCopyThread::ProcessVirt()
}
}
return Result;
return result2;
}
@@ -232,6 +234,8 @@ HRESULT CPanel::CopyTo(CCopyToOptions &options, const CRecordVector<UInt32> &ind
if (messages)
*messages = extracter.Sync.Messages;
// res = extracter.Result2;
res = extracter.Result;
if (res == S_OK && extracter.ExtractCallbackSpec->IsOK())
@@ -327,9 +331,11 @@ HRESULT CPanel::CopyFrom(bool moveMode, const UString &folderPrefix, const UStri
for (i = 0; i < updater.FileNames.Size(); i++)
updater.FileNamePointers.AddInReserved(updater.FileNames[i]);
NWindows::CThread thread;
RINOK(thread.Create(CThreadUpdate::MyThreadFunction, &updater));
updater.ProgressDialog.Create(title, thread, GetParent());
{
NWindows::CThread thread;
RINOK(thread.Create(CThreadUpdate::MyThreadFunction, &updater));
updater.ProgressDialog.Create(title, thread, GetParent());
}
if (messages)
*messages = updater.ProgressDialog.Sync.Messages;