Skip to content

Commit

Permalink
fix: use default channel main when uninstall
Browse files Browse the repository at this point in the history
Related: OpenAtom-Linyaps#208
Signed-off-by: black-desk <[email protected]>
  • Loading branch information
black-desk authored and kamiyadm committed Jan 18, 2024
1 parent fa84312 commit 1b8cee6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/linglong/package_manager/package_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,15 @@ auto PackageManager::Uninstall(const UninstallParamOption &paramOption) -> Reply

// 判断是否已安装 不校验用户名
QString userName = linglong::util::getUserName();
if (!linglong::util::getAppInstalledStatus(appId, version, arch, channel, appModule, "")) {
bool installed = false;

installed = linglong::util::getAppInstalledStatus(appId, version, arch, channel, appModule, "");
if (!installed && channel == "linglong") {
channel = "main";
installed =
linglong::util::getAppInstalledStatus(appId, version, arch, channel, appModule, "");
}
if (!installed) {
reply.message = appId + ", version:" + version + ", arch:" + arch + ", channel:" + channel
+ ", module:" + appModule + " not installed";
reply.code = STATUS_CODE(kPkgNotInstalled);
Expand Down

0 comments on commit 1b8cee6

Please sign in to comment.