diff options
Diffstat (limited to 'CPP/7zip/UI/Common/SetProperties.cpp')
-rwxr-xr-x | CPP/7zip/UI/Common/SetProperties.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/CPP/7zip/UI/Common/SetProperties.cpp b/CPP/7zip/UI/Common/SetProperties.cpp index b1434ace..201e95b5 100755 --- a/CPP/7zip/UI/Common/SetProperties.cpp +++ b/CPP/7zip/UI/Common/SetProperties.cpp @@ -44,9 +44,23 @@ HRESULT SetProperties(IUnknown *unknown, const CObjectVector<CProperty> &propert { const CProperty &property = properties[i]; NCOM::CPropVariant propVariant; - if (!property.Value.IsEmpty()) + UString name = property.Name; + if (property.Value.IsEmpty()) + { + if (!name.IsEmpty()) + { + wchar_t c = name[name.Length() - 1]; + if (c == L'-') + propVariant = false; + else if (c == L'+') + propVariant = true; + if (propVariant.vt != VT_EMPTY) + name = name.Left(name.Length() - 1); + } + } + else ParseNumberString(property.Value, propVariant); - realNames.Add(property.Name); + realNames.Add(name); values[i] = propVariant; } CRecordVector<const wchar_t *> names; |