mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-12 09:10:00 -06:00
22.00
This commit is contained in:
28
CPP/7zip/UI/Common/CompressCall2.cpp
Normal file → Executable file
28
CPP/7zip/UI/Common/CompressCall2.cpp
Normal file → Executable 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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user