Skip to content

Commit

Permalink
Merge pull request #349 from sebres/fix-set-common-props
Browse files Browse the repository at this point in the history
Fix setting of common properties (`-mmt=n` option is ignored by many handlers)
  • Loading branch information
mcmilk committed Sep 6, 2023
2 parents 8f52579 + a884f29 commit 3de9e01
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions CPP/7zip/Archive/Common/HandlerOut.cpp
Expand Up @@ -203,8 +203,9 @@ HRESULT CMultiMethodProps::SetProperty(const wchar_t *nameSpec, const PROPVARIAN

{
HRESULT hres;
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 */
}

UInt32 number;
Expand Down Expand Up @@ -258,11 +259,9 @@ HRESULT CSingleMethodProps::SetProperty(const wchar_t *name2, const PROPVARIANT
}
{
HRESULT hres;
if (SetCommonProperty(name, value, hres))
{
// processed = true;
return S_OK;
}
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 */
}
RINOK(ParseMethodFromPROPVARIANT(name, value));
return S_OK;
Expand Down

0 comments on commit 3de9e01

Please sign in to comment.