Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/UI/Common/SetProperties.cpp')
-rwxr-xr-xCPP/7zip/UI/Common/SetProperties.cpp18
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;