commit 41e741a9d9473fddf5d528aaafd90e326adf4c48
parent 5d63c3870e195c9b0ee1618902f6fa7aa43165d1
Author: Ryan Fu <69221034+ryfu-msft@users.noreply.github.com>
Date: Wed, 4 May 2022 16:04:27 -0700
Fix packageId and sourceId match check for portable install (#2138)
Diffstat:
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/AppInstallerCLICore/Workflows/PortableInstallFlow.cpp b/src/AppInstallerCLICore/Workflows/PortableInstallFlow.cpp
@@ -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))
diff --git a/src/AppInstallerCommonCore/PortableARPEntry.cpp b/src/AppInstallerCommonCore/PortableARPEntry.cpp
@@ -62,6 +62,7 @@ namespace AppInstaller::Registry::Portable
}
else
{
+ m_exists = false;
m_key = Key::Create(root, subKey);
}
}
diff --git a/src/AppInstallerCommonCore/Public/winget/PortableARPEntry.h b/src/AppInstallerCommonCore/Public/winget/PortableARPEntry.h
@@ -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;
};