mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-04 20:25:59 +01:00
parent
0ddb952d7a
commit
2687788236
1 changed files with 5 additions and 0 deletions
|
@ -66,6 +66,11 @@ std::string getRuntimeDir() {
|
|||
std::vector<SInstanceData> instances() {
|
||||
std::vector<SInstanceData> result;
|
||||
|
||||
try {
|
||||
if (!std::filesystem::exists(getRuntimeDir()))
|
||||
return {};
|
||||
} catch (std::exception& e) { return {}; }
|
||||
|
||||
for (const auto& el : std::filesystem::directory_iterator(getRuntimeDir())) {
|
||||
if (!el.is_directory() || !std::filesystem::exists(el.path().string() + "/hyprland.lock"))
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue