diff options
author | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2015-06-09 16:04:24 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2015-06-10 08:15:38 +0000 |
commit | 4677d362982a38c6e2aabb667e33aaa7f921f018 (patch) | |
tree | fe3b676288f05a87cdbb53a170e815427e3d9380 /src/libs/7zip/unix/CPP/7zip/UI/Common/UpdateProduce.cpp | |
parent | 22ec6aa53e44069c03c7baf94881949c7a4facff (diff) |
Update source tree with version 9.38.beta of LZMA SDK.
- Remove unused files.
- Split in .pri files.
- Add HEADERS section.
- Adjust lib7z_facade.
Change-Id: I31e7bafbfe1a9346364bd58c391601955f98ad3a
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/7zip/unix/CPP/7zip/UI/Common/UpdateProduce.cpp')
-rw-r--r-- | src/libs/7zip/unix/CPP/7zip/UI/Common/UpdateProduce.cpp | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/libs/7zip/unix/CPP/7zip/UI/Common/UpdateProduce.cpp b/src/libs/7zip/unix/CPP/7zip/UI/Common/UpdateProduce.cpp index c21db3b2a..2c4c28583 100644 --- a/src/libs/7zip/unix/CPP/7zip/UI/Common/UpdateProduce.cpp +++ b/src/libs/7zip/unix/CPP/7zip/UI/Common/UpdateProduce.cpp @@ -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; - - switch(actionSet.StateActions[pair.State]) + up2.UseArcProps = false; + + switch (actionSet.StateActions[pair.State]) { case NPairAction::kIgnore: /* @@ -39,17 +39,32 @@ 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: if (pair.State == NPairState::kOnlyInArchive || pair.State == NPairState::kNotMasked) throw kUpdateActionSetCollision; break; - + case NPairAction::kCompressAsAnti: up2.IsAnti = true; + up2.UseArcProps = (pair.ArcIndex >= 0); break; } operationChain.Add(up2); |