commit 28a239c663da1f8551c01e2851c0e4f0433d7d74
parent c81e2b6e61147b7de2f01f6f7b3c13d42aa2e886
Author: JohnMcPMS <johnmcp@microsoft.com>
Date: Fri, 14 Feb 2025 10:38:43 -0800
Update primary index when moving package (#5204)
Fixes #5202
## Change
When moving the primary package to a new location, update the index so
any future attempts to reference it target the correct location.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/AppInstallerRepositoryCore/CompositeSource.cpp b/src/AppInstallerRepositoryCore/CompositeSource.cpp
@@ -1299,6 +1299,7 @@ namespace AppInstaller::Repository
{
currentMatch.Package = std::move(Matches[latestPrimaryAvailable->PrimaryPackageIndex.value()].Package);
Matches[latestPrimaryAvailable->PrimaryPackageIndex.value()].Package.reset();
+ latestPrimaryAvailable->PrimaryPackageIndex = i;
}
continue;
}