aboutsummaryrefslogtreecommitdiffhomepage
path: root/hyprpm
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-02-02 01:51:14 +0000
committerVaxry <[email protected]>2024-02-02 01:51:14 +0000
commit7447be822080fac5b8515a177773ec74b4d6c925 (patch)
tree5588030f04f61afca6b43a0b40313aaa2ebbebd1 /hyprpm
parent4644de2269b06e60764cc788e39a18f44d1dd9b6 (diff)
downloadHyprland-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.cpp5
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");