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/Agent/AgentProxy.cpp')
-rwxr-xr-xCPP/7zip/UI/Agent/AgentProxy.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/CPP/7zip/UI/Agent/AgentProxy.cpp b/CPP/7zip/UI/Agent/AgentProxy.cpp
index bb0d0530..a50a26c7 100755
--- a/CPP/7zip/UI/Agent/AgentProxy.cpp
+++ b/CPP/7zip/UI/Agent/AgentProxy.cpp
@@ -228,7 +228,20 @@ HRESULT CProxyArchive::ReadObjects(IInArchive *archive, IProgress *progress)
CProxyFolder *currentItem = &RootFolder;
UString fileName;
if(propVariantPath.vt == VT_EMPTY)
+ {
fileName = DefaultName;
+
+ NCOM::CPropVariant prop;
+ RINOK(archive->GetProperty(i, kpidExtension, &prop));
+ if (prop.vt == VT_BSTR)
+ {
+ fileName += L'.';
+ fileName += prop.bstrVal;
+ }
+ else if (prop.vt != VT_EMPTY)
+ return E_FAIL;
+
+ }
else
{
if(propVariantPath.vt != VT_BSTR)