Default to same-version upgrades for bundles.
Sean Hall committed
Oct 31, 2020 at 21:22 UTC
fac8fc35113cd9c42dc9cc4ea62d2645db863760
2 files changed
+5
-5
src/engine/detect.cpp
+4
-4
@@ -175,13 +175,13 @@ extern "C" HRESULT DetectReportRelatedBundles(
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);
177
178
- if (nCompareResult > 0)
178
+ if (nCompareResult < 0)
179
{
180
- operation = BOOTSTRAPPER_RELATED_OPERATION_MAJOR_UPGRADE;
180
+ operation = BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE;
181
}
182
- else if (nCompareResult < 0)
182
+ else
183
{
184
- operation = BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE;
184
+ operation = BOOTSTRAPPER_RELATED_OPERATION_MAJOR_UPGRADE;
185
}
186
}
187
break;
src/engine/plan.cpp
+1
-1
@@ -1265,7 +1265,7 @@ extern "C" HRESULT PlanRelatedBundlesBegin(
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);
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
}
1270
break;
1271
case BOOTSTRAPPER_RELATION_PATCH: __fallthrough;