diff options
author | Vaxry <[email protected]> | 2024-02-02 01:51:14 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-02-02 01:51:14 +0000 |
commit | 7447be822080fac5b8515a177773ec74b4d6c925 (patch) | |
tree | 5588030f04f61afca6b43a0b40313aaa2ebbebd1 /hyprpm | |
parent | 4644de2269b06e60764cc788e39a18f44d1dd9b6 (diff) | |
download | Hyprland-7447be822080fac5b8515a177773ec74b4d6c925.tar.gz Hyprland-7447be822080fac5b8515a177773ec74b4d6c925.zip |
hyprpm: fix crash on add plugin
ref #4563
Diffstat (limited to 'hyprpm')
-rw-r--r-- | hyprpm/src/core/DataState.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hyprpm/src/core/DataState.cpp b/hyprpm/src/core/DataState.cpp index cf54ecc6..b6b34375 100644 --- a/hyprpm/src/core/DataState.cpp +++ b/hyprpm/src/core/DataState.cpp @@ -207,7 +207,10 @@ bool DataState::setPluginEnabled(const std::string& name, bool enabled) { const auto PATH = getDataStatePath(); for (const auto& entry : std::filesystem::directory_iterator(PATH)) { - if (!entry.is_directory()) + if (!entry.is_directory() || entry.path().stem() == "headersRoot") + continue; + + if (!std::filesystem::exists(entry.path().string() + "/state.toml")) continue; auto STATE = toml::parse_file(entry.path().string() + "/state.toml"); |