diff options
Diffstat (limited to 'CPP/7zip/UI/Agent/Agent.h')
-rwxr-xr-x | CPP/7zip/UI/Agent/Agent.h | 21 |
1 files changed, 21 insertions, 0 deletions
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 |