diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index eefd0f3..8a99803 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -174,7 +174,8 @@ std::vector CConfigManager::getSettings() { for (auto& key : keys) { std::string monitor, fitMode, path, order; - int timeout, recursive; + int timeout; + bool recursive; try { monitor = std::any_cast(m_config.getSpecialConfigValue("wallpaper", "monitor", key.c_str())); @@ -188,7 +189,7 @@ std::vector CConfigManager::getSettings() { continue; } - const auto RESOLVE_PATH = getFullPath(path, recursive != 0); + const auto RESOLVE_PATH = getFullPath(path, recursive); if (!RESOLVE_PATH) { g_logger->log(LOG_ERR, "Failed to resolve path {}: {}", path, RESOLVE_PATH.error()); @@ -215,7 +216,14 @@ std::vector CConfigManager::getSettings() { } } - result.emplace_back(SSetting{.monitor = std::move(monitor), .fitMode = std::move(fitMode), .paths = std::move(resolvedPaths), .order = std::move(order), .timeout = timeout}); + result.emplace_back(SSetting{ + .monitor = std::move(monitor), + .fitMode = std::move(fitMode), + .paths = std::move(resolvedPaths), + .order = std::move(order), + .timeout = timeout, + .recursive = recursive, + }); } return result; diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index 6fd336e..7ec6529 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -16,9 +16,10 @@ class CConfigManager { struct SSetting { std::string monitor, fitMode; std::vector paths; - std::string order = "default"; - int timeout = 0; - uint32_t id = 0; + std::string order = "default"; + int timeout = 0; + uint32_t id = 0; + bool recursive = false; }; constexpr static const uint32_t SETTING_INVALID = 0;