Update to 7-Zip Version 22.00

See: https://sourceforge.net/p/sevenzip/discussion/45797/thread/9c2d9061ce/
This commit is contained in:
Tino Reichardt
2022-08-07 09:59:33 +02:00
parent 6a4fe97fc3
commit 57558682a8
211 changed files with 15251 additions and 2482 deletions
+16 -12
View File
@@ -152,19 +152,12 @@ HRESULT CompressFiles(
static HRESULT ExtractGroupCommand(const UStringVector &arcPaths,
bool showDialog, const UString &outFolder, bool testMode, bool elimDup = false,
const char *kType = NULL)
bool showDialog, CExtractOptions &eo, const char *kType = NULL)
{
MY_TRY_BEGIN
CREATE_CODECS
CExtractOptions eo;
eo.OutputDir = us2fs(outFolder);
eo.TestMode = testMode;
eo.ElimDup.Val = elimDup;
eo.ElimDup.Def = elimDup;
CExtractCallbackImp *ecs = new CExtractCallbackImp;
CMyComPtr<IFolderArchiveExtractCallback> extractCallback = ecs;
@@ -228,15 +221,26 @@ static HRESULT ExtractGroupCommand(const UStringVector &arcPaths,
return result;
}
void ExtractArchives(const UStringVector &arcPaths, const UString &outFolder, bool showDialog, bool elimDup)
void ExtractArchives(const UStringVector &arcPaths, const UString &outFolder,
bool showDialog, bool elimDup, UInt32 writeZone)
{
ExtractGroupCommand(arcPaths, showDialog, outFolder, false, elimDup);
CExtractOptions eo;
eo.OutputDir = us2fs(outFolder);
eo.TestMode = false;
eo.ElimDup.Val = elimDup;
eo.ElimDup.Def = elimDup;
if (writeZone != (UInt32)(Int32)-1)
eo.ZoneMode = (NExtract::NZoneIdMode::EEnum)writeZone;
ExtractGroupCommand(arcPaths, showDialog, eo);
}
void TestArchives(const UStringVector &arcPaths, bool hashMode)
{
ExtractGroupCommand(arcPaths, true, UString(), true,
false, // elimDup
CExtractOptions eo;
eo.TestMode = true;
ExtractGroupCommand(arcPaths,
true, // showDialog
eo,
hashMode ? "hash" : NULL);
}