summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/win/CPP/7zip/UI/Common/UpdateProduce.cpp
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2022-04-06 13:33:38 +0300
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2022-04-13 11:32:09 +0300
commit96ade47c182bf37a2efca2aa62922e54e5ff1660 (patch)
tree93ceee6c6f8984f563f3dfe83e56f98b66b40f3a /src/libs/7zip/win/CPP/7zip/UI/Common/UpdateProduce.cpp
parent2d5f0ffaf1278516bbd74e3b60f9849f4c51cffa (diff)
Move LZMA SDK to 3rdparty subdirectory
Also add attribution document. Task-number: QTIFW-2336 Change-Id: I91546bc6c3ace244e4b546b945f40b7d204f7463 Reviewed-by: Katja Marttila <katja.marttila@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/libs/7zip/win/CPP/7zip/UI/Common/UpdateProduce.cpp')
-rw-r--r--src/libs/7zip/win/CPP/7zip/UI/Common/UpdateProduce.cpp73
1 files changed, 0 insertions, 73 deletions
diff --git a/src/libs/7zip/win/CPP/7zip/UI/Common/UpdateProduce.cpp b/src/libs/7zip/win/CPP/7zip/UI/Common/UpdateProduce.cpp
deleted file mode 100644
index 2c4c28583..000000000
--- a/src/libs/7zip/win/CPP/7zip/UI/Common/UpdateProduce.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-// UpdateProduce.cpp
-
-#include "StdAfx.h"
-
-#include "UpdateProduce.h"
-
-using namespace NUpdateArchive;
-
-static const char *kUpdateActionSetCollision = "Internal collision in update action set";
-
-void UpdateProduce(
- const CRecordVector<CUpdatePair> &updatePairs,
- const CActionSet &actionSet,
- CRecordVector<CUpdatePair2> &operationChain,
- IUpdateProduceCallback *callback)
-{
- FOR_VECTOR (i, updatePairs)
- {
- const CUpdatePair &pair = updatePairs[i];
-
- CUpdatePair2 up2;
- up2.DirIndex = pair.DirIndex;
- up2.ArcIndex = pair.ArcIndex;
- up2.NewData = up2.NewProps = true;
- up2.UseArcProps = false;
-
- switch (actionSet.StateActions[pair.State])
- {
- case NPairAction::kIgnore:
- /*
- if (pair.State != NPairState::kOnlyOnDisk)
- IgnoreArchiveItem(m_ArchiveItems[pair.ArcIndex]);
- // cout << "deleting";
- */
- if (callback)
- callback->ShowDeleteFile(pair.ArcIndex);
- continue;
-
- 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);
- }
- operationChain.ReserveDown();
-}