diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2008-05-05 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:55 +0300 |
commit | 3901bf0ab88106a5b031cba7bc18d60cdebf7eef (patch) | |
tree | 808a2489abed822223b118b64e0553db80af6087 /CPP/7zip/UI/Common/SetProperties.cpp | |
parent | bd1fa36322ac27f5715433b388742893d6524516 (diff) |
4.58 beta
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; |