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:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2008-05-05 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:55 +0300
commit3901bf0ab88106a5b031cba7bc18d60cdebf7eef (patch)
tree808a2489abed822223b118b64e0553db80af6087 /CPP/7zip/UI/Agent
parentbd1fa36322ac27f5715433b388742893d6524516 (diff)
4.58 beta
Diffstat (limited to 'CPP/7zip/UI/Agent')
-rwxr-xr-xCPP/7zip/UI/Agent/AgentOut.cpp7
-rwxr-xr-xCPP/7zip/UI/Agent/AgentProxy.cpp13
2 files changed, 17 insertions, 3 deletions
diff --git a/CPP/7zip/UI/Agent/AgentOut.cpp b/CPP/7zip/UI/Agent/AgentOut.cpp
index 4c6ba1a1..7976e1a2 100755
--- a/CPP/7zip/UI/Agent/AgentOut.cpp
+++ b/CPP/7zip/UI/Agent/AgentOut.cpp
@@ -250,7 +250,7 @@ STDMETHODIMP CAgent::DoOperation(
UString resultPath;
int pos;
if(!NFile::NDirectory::MyGetFullPathName(archiveName, resultPath, pos))
- throw 141716;
+ return E_FAIL;
NFile::NDirectory::CreateComplexDirectory(resultPath.Left(pos));
}
if (!outStreamSpec->Create(archiveName, true))
@@ -282,7 +282,7 @@ STDMETHODIMP CAgent::DoOperation(
catch(...)
{
delete []propValues;
- throw;
+ return E_FAIL;
}
delete []propValues;
}
@@ -295,7 +295,8 @@ STDMETHODIMP CAgent::DoOperation(
CInFileStream *sfxStreamSpec = new CInFileStream;
CMyComPtr<IInStream> sfxStream(sfxStreamSpec);
if (!sfxStreamSpec->Open(sfxModule))
- throw "Can't open sfx module";
+ return E_FAIL;
+ // throw "Can't open sfx module";
RINOK(CopyBlock(sfxStream, outStream));
}
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)