aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-10-31 21:22:52 -0600
committerSean Hall <r.sean.hall@gmail.com>2020-10-31 22:26:15 -0500
commitfac8fc35113cd9c42dc9cc4ea62d2645db863760 (patch)
treee31b2c47ab5c5c81dc55b46efd9f6676378cc51e
parenta0c40d5a1b8537a6338dacc27a88d236077ab785 (diff)
downloadwix-fac8fc35113cd9c42dc9cc4ea62d2645db863760.tar.gz
wix-fac8fc35113cd9c42dc9cc4ea62d2645db863760.tar.bz2
wix-fac8fc35113cd9c42dc9cc4ea62d2645db863760.zip
Default to same-version upgrades for bundles.
-rw-r--r--src/engine/detect.cpp8
-rw-r--r--src/engine/plan.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/engine/detect.cpp b/src/engine/detect.cpp
index 9e4681bb..176780af 100644
--- a/src/engine/detect.cpp
+++ b/src/engine/detect.cpp
@@ -175,13 +175,13 @@ extern "C" HRESULT DetectReportRelatedBundles(
175 hr = VerCompareParsedVersions(pRegistration->pVersion, pRelatedBundle->pVersion, &nCompareResult); 175 hr = VerCompareParsedVersions(pRegistration->pVersion, pRelatedBundle->pVersion, &nCompareResult);
176 ExitOnFailure(hr, "Failed to compare bundle version '%ls' to related bundle version '%ls'", pRegistration->pVersion, pRelatedBundle->pVersion); 176 ExitOnFailure(hr, "Failed to compare bundle version '%ls' to related bundle version '%ls'", pRegistration->pVersion, pRelatedBundle->pVersion);
177 177
178 if (nCompareResult > 0) 178 if (nCompareResult < 0)
179 { 179 {
180 operation = BOOTSTRAPPER_RELATED_OPERATION_MAJOR_UPGRADE; 180 operation = BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE;
181 } 181 }
182 else if (nCompareResult < 0) 182 else
183 { 183 {
184 operation = BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE; 184 operation = BOOTSTRAPPER_RELATED_OPERATION_MAJOR_UPGRADE;
185 } 185 }
186 } 186 }
187 break; 187 break;
diff --git a/src/engine/plan.cpp b/src/engine/plan.cpp
index f6b681b6..3c0e1c50 100644
--- a/src/engine/plan.cpp
+++ b/src/engine/plan.cpp
@@ -1265,7 +1265,7 @@ extern "C" HRESULT PlanRelatedBundlesBegin(
1265 hr = VerCompareParsedVersions(pRegistration->pVersion, pRelatedBundle->pVersion, &nCompareResult); 1265 hr = VerCompareParsedVersions(pRegistration->pVersion, pRelatedBundle->pVersion, &nCompareResult);
1266 ExitOnFailure(hr, "Failed to compare bundle version '%ls' to related bundle version '%ls'", pRegistration->pVersion, pRelatedBundle->pVersion); 1266 ExitOnFailure(hr, "Failed to compare bundle version '%ls' to related bundle version '%ls'", pRegistration->pVersion, pRelatedBundle->pVersion);
1267 1267
1268 pRelatedBundle->package.requested = (nCompareResult > 0) ? BOOTSTRAPPER_REQUEST_STATE_ABSENT : BOOTSTRAPPER_REQUEST_STATE_NONE; 1268 pRelatedBundle->package.requested = (nCompareResult < 0) ? BOOTSTRAPPER_REQUEST_STATE_NONE : BOOTSTRAPPER_REQUEST_STATE_ABSENT;
1269 } 1269 }
1270 break; 1270 break;
1271 case BOOTSTRAPPER_RELATION_PATCH: __fallthrough; 1271 case BOOTSTRAPPER_RELATION_PATCH: __fallthrough;