diff options
Diffstat (limited to 'hyprtester/src/hyprctlCompat.cpp')
| -rw-r--r-- | hyprtester/src/hyprctlCompat.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hyprtester/src/hyprctlCompat.cpp b/hyprtester/src/hyprctlCompat.cpp index 2c8e0644..dbeee93d 100644 --- a/hyprtester/src/hyprctlCompat.cpp +++ b/hyprtester/src/hyprctlCompat.cpp @@ -43,7 +43,7 @@ std::vector<SInstanceData> instances() { } 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")) + if (!std::filesystem::exists(el.path() / "hyprland.lock")) continue; // read lock @@ -74,7 +74,7 @@ std::vector<SInstanceData> instances() { std::erase_if(result, [&](const auto& el) { return kill(el.pid, 0) != 0 && errno == ESRCH; }); - std::sort(result.begin(), result.end(), [&](const auto& a, const auto& b) { return a.time < b.time; }); + std::ranges::sort(result, [&](const auto& a, const auto& b) { return a.time < b.time; }); return result; } @@ -135,4 +135,4 @@ std::string getFromSocket(const std::string& cmd) { close(SERVERSOCKET); return reply; -}
\ No newline at end of file +} |
