mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 22:07:07 -06:00
9.34
This commit is contained in:
committed by
Kornel Lesiński
parent
83f8ddcc5b
commit
f08f4dcc3c
21
CPP/7zip/UI/Common/UpdateProduce.cpp
Executable file → Normal file
21
CPP/7zip/UI/Common/UpdateProduce.cpp
Executable file → Normal file
@@ -14,17 +14,17 @@ void UpdateProduce(
|
||||
CRecordVector<CUpdatePair2> &operationChain,
|
||||
IUpdateProduceCallback *callback)
|
||||
{
|
||||
for (int i = 0; i < updatePairs.Size(); i++)
|
||||
FOR_VECTOR (i, updatePairs)
|
||||
{
|
||||
const CUpdatePair &pair = updatePairs[i];
|
||||
|
||||
CUpdatePair2 up2;
|
||||
up2.IsAnti = false;
|
||||
up2.DirIndex = pair.DirIndex;
|
||||
up2.ArcIndex = pair.ArcIndex;
|
||||
up2.NewData = up2.NewProps = true;
|
||||
up2.UseArcProps = false;
|
||||
|
||||
switch(actionSet.StateActions[pair.State])
|
||||
switch (actionSet.StateActions[pair.State])
|
||||
{
|
||||
case NPairAction::kIgnore:
|
||||
/*
|
||||
@@ -39,7 +39,21 @@ void UpdateProduce(
|
||||
case NPairAction::kCopy:
|
||||
if (pair.State == NPairState::kOnlyOnDisk)
|
||||
throw kUpdateActionSetCollision;
|
||||
if (pair.State == NPairState::kOnlyInArchive)
|
||||
{
|
||||
if (pair.HostIndex >= 0)
|
||||
{
|
||||
/*
|
||||
ignore alt stream if
|
||||
1) no such alt stream in Disk
|
||||
2) there is Host file in disk
|
||||
*/
|
||||
if (updatePairs[pair.HostIndex].DirIndex >= 0)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
up2.NewData = up2.NewProps = false;
|
||||
up2.UseArcProps = true;
|
||||
break;
|
||||
|
||||
case NPairAction::kCompress:
|
||||
@@ -50,6 +64,7 @@ void UpdateProduce(
|
||||
|
||||
case NPairAction::kCompressAsAnti:
|
||||
up2.IsAnti = true;
|
||||
up2.UseArcProps = (pair.ArcIndex >= 0);
|
||||
break;
|
||||
}
|
||||
operationChain.Add(up2);
|
||||
|
||||
Reference in New Issue
Block a user