mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 21:25:58 +01:00
hyprctl: fix showing invalid instances
This commit is contained in:
parent
e9528fc214
commit
5824b0f305
1 changed files with 2 additions and 2 deletions
|
@ -89,7 +89,7 @@ std::vector<SInstanceData> instances() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
data->time = std::stoull(data->id.substr(data->id.find_first_of('_') + 1));
|
data->time = std::stoull(data->id.substr(data->id.find_first_of('_') + 1));
|
||||||
} catch (std::exception& e) { data->time = 0; }
|
} catch (std::exception& e) { continue; }
|
||||||
|
|
||||||
// read file
|
// read file
|
||||||
std::ifstream ifs(el.path().string());
|
std::ifstream ifs(el.path().string());
|
||||||
|
@ -99,7 +99,7 @@ std::vector<SInstanceData> instances() {
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
try {
|
try {
|
||||||
data->pid = std::stoull(line);
|
data->pid = std::stoull(line);
|
||||||
} catch (std::exception& e) { data->pid = 0; }
|
} catch (std::exception& e) { continue; }
|
||||||
} else if (i == 1) {
|
} else if (i == 1) {
|
||||||
data->wlSocket = line;
|
data->wlSocket = line;
|
||||||
} else
|
} else
|
||||||
|
|
Loading…
Reference in a new issue