解决linux下升级结果返回不正确的问题
This commit is contained in:
parent
b315b0dba5
commit
3442c966b0
|
@ -75,7 +75,8 @@ bool MainWindow::Upgrade(const std::string& pkgPath)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
std::string cmd = "pkexec dpkg -i \"" + pkgPath + "\"";
|
std::string cmd = "pkexec dpkg -i \"" + pkgPath + "\"";
|
||||||
if (0 == system(cmd.c_str()))
|
int status = system(cmd.c_str());
|
||||||
|
if (-1 != status && WIFEXITED(status) && 0 == WEXITSTATUS(status))
|
||||||
ret = true;
|
ret = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue