exec: use prev ret if bad system call

pull/1360/merge
flightlessmango 3 months ago
parent bda2af47b0
commit 8f94973cd8

@ -1657,8 +1657,12 @@ void HudElements::update_exec(){
if (!HUDElements.shell)
HUDElements.shell = std::make_unique<Shell>();
for(auto& item : exec_list)
item.ret = HUDElements.shell->exec(item.value + "\n");
for(auto& item : exec_list){
std::string ret = HUDElements.shell->exec(item.value + "\n");
// use the previous ret if we get bad system call
if (ret.find("Bad system call") == std::string::npos)
item.ret = ret;
}
#endif
}

Loading…
Cancel
Save