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-08-16 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:16:55 +0300
commitcba375916fb18db8b9101aedf4fa079e019311b3 (patch)
tree6275ae5fc2a8dd337ab0327180c871807e6ba5d4 /CPP/7zip/UI/Agent
parent54490d51d5c6b0d794dcbad2d634d4c95fc25b6c (diff)
15.0615.06
Diffstat (limited to 'CPP/7zip/UI/Agent')
-rw-r--r--CPP/7zip/UI/Agent/AgentOut.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/CPP/7zip/UI/Agent/AgentOut.cpp b/CPP/7zip/UI/Agent/AgentOut.cpp
index 3fed8cba..0468fdd1 100644
--- a/CPP/7zip/UI/Agent/AgentOut.cpp
+++ b/CPP/7zip/UI/Agent/AgentOut.cpp
@@ -380,6 +380,21 @@ STDMETHODIMP CAgent::DoOperation(
HRESULT res = outArchive->UpdateItems(outArchiveStream, updatePairs2.Size(), updateCallback);
if (res == S_OK && processedPaths)
{
+ {
+ /* OutHandler for 7z archives doesn't report compression operation for empty files.
+ So we must include these files manually */
+ FOR_VECTOR(i, updatePairs2)
+ {
+ const CUpdatePair2 &up = updatePairs2[i];
+ if (up.DirIndex >= 0 && up.NewData)
+ {
+ const CDirItem &di = dirItems.Items[up.DirIndex];
+ if (!di.IsDir() && di.Size == 0)
+ processedItems[up.DirIndex] = 1;
+ }
+ }
+ }
+
FOR_VECTOR (i, dirItems.Items)
if (processedItems[i] != 0)
processedPaths->Add(dirItems.GetPhyPath(i));