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>2010-11-02 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:16:04 +0300
commitc65230d8585317f7cd58ae2982067385269fdee9 (patch)
tree436513094ff5034da4c88def9609f0ea376065c6 /CPP/7zip/UI/Agent
parent2eb60a059819da595efb8e1de49f04c241f5b981 (diff)
9.189.18
Diffstat (limited to 'CPP/7zip/UI/Agent')
-rwxr-xr-xCPP/7zip/UI/Agent/Agent.cpp2
-rwxr-xr-xCPP/7zip/UI/Agent/Agent.h21
2 files changed, 22 insertions, 1 deletions
diff --git a/CPP/7zip/UI/Agent/Agent.cpp b/CPP/7zip/UI/Agent/Agent.cpp
index 4db95c87..4a099308 100755
--- a/CPP/7zip/UI/Agent/Agent.cpp
+++ b/CPP/7zip/UI/Agent/Agent.cpp
@@ -609,7 +609,7 @@ STDMETHODIMP CAgent::GetArcProp(UInt32 level, PROPID propID, PROPVARIANT *value)
CArc &arc = _archiveLink.Arcs[level];
switch(propID)
{
- case kpidType: prop = _codecs->Formats[arc.FormatIndex].Name; break;
+ case kpidType: prop = GetTypeOfArc(arc); break;
case kpidPath: prop = arc.Path; break;
default: return arc.Archive->GetArchiveProperty(propID, value);
}
diff --git a/CPP/7zip/UI/Agent/Agent.h b/CPP/7zip/UI/Agent/Agent.h
index c5efb411..454964bc 100755
--- a/CPP/7zip/UI/Agent/Agent.h
+++ b/CPP/7zip/UI/Agent/Agent.h
@@ -206,6 +206,27 @@ public:
const CArc &GetArc() { return _archiveLink.Arcs.Back(); }
IInArchive *GetArchive() { if ( _archiveLink.Arcs.IsEmpty()) return 0; return GetArc().Archive; }
bool CanUpdate() const { return _archiveLink.Arcs.Size() <= 1; }
+
+ UString GetTypeOfArc(const CArc &arc) const { return _codecs->Formats[arc.FormatIndex].Name; }
+ UString GetErrorMessage() const
+ {
+ UString s;
+ for (int i = _archiveLink.Arcs.Size() - 1; i >= 0; i--)
+ {
+ const CArc &arc = _archiveLink.Arcs[i];
+ if (arc.ErrorMessage.IsEmpty())
+ continue;
+ if (!s.IsEmpty())
+ s += L"--------------------\n";
+ s += arc.ErrorMessage;
+ s += L"\n\n[";
+ s += GetTypeOfArc(arc);
+ s += L"] ";
+ s += arc.Path;
+ s += L"\n";
+ }
+ return s;
+ }
};
#ifdef NEW_FOLDER_INTERFACE