fix: 安装结束的错误判断

This commit is contained in:
2022-12-28 12:31:15 +08:00
parent e344b16aa0
commit 2ab4ebc0e3

View File

@@ -135,7 +135,7 @@ void DownloadItem::install(int t)
isInstall.start("dpkg", QStringList() << "-s" << pkgName);
isInstall.waitForFinished(180*1000); // 默认超时 3 分钟
int error = QString::fromStdString(isInstall.readAllStandardError().toStdString()).length();
if(error == 0 && haveError)
if (error == 0 && !haveError)
{
ui->pushButton_install->hide();
Utils::sendNotification("spark-store",tr("Spark Store"),ui->label->text() + " " + tr("Installation complete."));