This commit is contained in:
Igor Pavlov
2010-11-02 00:00:00 +00:00
committed by Kornel Lesiński
parent 2eb60a0598
commit c65230d858
101 changed files with 4557 additions and 541 deletions

View File

@@ -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);
}

View File

@@ -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