Skip to content

Commit

Permalink
Fix packageId and sourceId match check for portable install (#2138)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryfu-msft authored May 4, 2022
1 parent 5d63c38 commit 41e741a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/AppInstallerCLICore/Workflows/PortableInstallFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ namespace AppInstaller::CLI::Workflow

if(uninstallEntry.Exists())
{
if (uninstallEntry.IsSamePortablePackageEntry(packageIdentifier, sourceIdentifier))
if (!uninstallEntry.IsSamePortablePackageEntry(packageIdentifier, sourceIdentifier))
{
// TODO: Replace HashOverride with --Force when argument behavior gets updated.
if (!context.Args.Contains(Execution::Args::Type::HashOverride))
Expand Down
1 change: 1 addition & 0 deletions src/AppInstallerCommonCore/PortableARPEntry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ namespace AppInstaller::Registry::Portable
}
else
{
m_exists = false;
m_key = Key::Create(root, subKey);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace AppInstaller::Registry::Portable
Registry::Key GetKey() { return m_key; };

private:
bool m_exists;
bool m_exists = false;
Key m_key;
};

Expand Down

0 comments on commit 41e741a

Please sign in to comment.