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>2015-09-22 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:16:55 +0300
commitf6444c32568553e0261ca0105083658f12be6284 (patch)
tree8f4eb80f6accd2a9d0759e2564fd6a2b00836e02 /CPP/7zip/UI/Agent
parentcba375916fb18db8b9101aedf4fa079e019311b3 (diff)
15.0715.07
Diffstat (limited to 'CPP/7zip/UI/Agent')
-rw-r--r--CPP/7zip/UI/Agent/Agent.cpp3
-rw-r--r--CPP/7zip/UI/Agent/Agent.h16
2 files changed, 15 insertions, 4 deletions
diff --git a/CPP/7zip/UI/Agent/Agent.cpp b/CPP/7zip/UI/Agent/Agent.cpp
index 557282eb..201e82c1 100644
--- a/CPP/7zip/UI/Agent/Agent.cpp
+++ b/CPP/7zip/UI/Agent/Agent.cpp
@@ -1465,6 +1465,9 @@ STDMETHODIMP CAgentFolder::Extract(const UInt32 *indices,
extractCallbackSpec->InitForMulti(false, pathMode, overwriteMode);
+ if (extractCallback2)
+ extractCallback2->SetTotal(_agentSpec->GetArc().GetEstmatedPhySize());
+
FString pathU;
if (path)
{
diff --git a/CPP/7zip/UI/Agent/Agent.h b/CPP/7zip/UI/Agent/Agent.h
index 2c505b84..9d70c7a1 100644
--- a/CPP/7zip/UI/Agent/Agent.h
+++ b/CPP/7zip/UI/Agent/Agent.h
@@ -251,7 +251,9 @@ public:
FOR_VECTOR (i, _archiveLink.Arcs)
{
const CArc &arc = _archiveLink.Arcs[i];
- if (!g_CodecsObj->Formats[arc.FormatIndex].UpdateEnabled || arc.IsReadOnly)
+ if (arc.FormatIndex < 0
+ || arc.IsReadOnly
+ || !g_CodecsObj->Formats[arc.FormatIndex].UpdateEnabled)
return true;
}
return false;
@@ -274,9 +276,14 @@ public:
UString s2;
if (arc.ErrorInfo.ErrorFormatIndex >= 0)
{
- s2.AddAscii("Can not open the file as [");
- s2 += g_CodecsObj->Formats[arc.ErrorInfo.ErrorFormatIndex].Name;
- s2.AddAscii("] archive");
+ if (arc.ErrorInfo.ErrorFormatIndex == arc.FormatIndex)
+ s2.AddAscii("Warning: The archive is open with offset");
+ else
+ {
+ s2.AddAscii("Can not open the file as [");
+ s2 += g_CodecsObj->GetFormatNamePtr(arc.ErrorInfo.ErrorFormatIndex);
+ s2.AddAscii("] archive");
+ }
}
if (!arc.ErrorInfo.ErrorMessage.IsEmpty())
@@ -288,6 +295,7 @@ public:
s2.AddAscii("]: ");
s2 += arc.ErrorInfo.ErrorMessage;
}
+
if (!s2.IsEmpty())
{
if (!s.IsEmpty())