Skip to content

Commit

Permalink
Don't pass common compression props to handlers. (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhngtu authored Jan 17, 2024
1 parent 0090ebf commit 221bcaf
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions NanaZip.Core/SevenZip/CPP/7zip/Archive/Common/HandlerOut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,18 @@ HRESULT CMultiMethodProps::SetProperty(const wchar_t *nameSpec, const PROPVARIAN

{
HRESULT hres;
// **************** 7-Zip ZS Modification Start ****************
/*if (SetCommonProperty(name, value, hres))
return hres;*/
SetCommonProperty(name, value, hres);
/* don't return here, since many handlers set common properties (e. g. kNumThreads)
with SetCoderProperties, so add it also as prop by its ID from name below */
// **************** 7-Zip ZS Modification End ****************
// **************** NanaZip Modification Start ****************
if (SetCommonProperty(name, value, hres))
{
if (name.IsPrefixedBy_Ascii_NoCase("mt"))
{
// pass through kNumThreads to handler
}
else {
return hres;
}
}
// **************** NanaZip Modification End ****************
}

UInt32 number;
Expand Down

0 comments on commit 221bcaf

Please sign in to comment.