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/OpenArchive.cpp')
-rwxr-xr-xCPP/7zip/UI/Common/OpenArchive.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/CPP/7zip/UI/Common/OpenArchive.cpp b/CPP/7zip/UI/Common/OpenArchive.cpp
index d61c7f17..56a63046 100755
--- a/CPP/7zip/UI/Common/OpenArchive.cpp
+++ b/CPP/7zip/UI/Common/OpenArchive.cpp
@@ -111,6 +111,7 @@ HRESULT CArc::OpenStream(
IArchiveOpenCallback *callback)
{
Archive.Release();
+ ErrorMessage.Empty();
const UString fileName = ExtractFileNameFromPath(Path);
UString extension;
{
@@ -298,6 +299,13 @@ HRESULT CArc::OpenStream(
if (result == S_FALSE)
continue;
RINOK(result);
+
+ {
+ NCOM::CPropVariant prop;
+ archive->GetArchiveProperty(kpidError, &prop);
+ if (prop.vt != VT_EMPTY)
+ ErrorMessage = (prop.vt == VT_BSTR) ? prop.bstrVal : L"Unknown error";
+ }
Archive = archive;
const CArcInfoEx &format = codecs->Formats[FormatIndex];