From 77137cf72b3ce919e3a5e6ed7d06a8d411d22c4a Mon Sep 17 00:00:00 2001 From: Nick Date: Tue, 1 Nov 2022 15:40:50 -0400 Subject: [PATCH] Allow parsing home dir with contains keyword --- src/config/ConfigManager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 1a1f492..29253eb 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -122,16 +122,16 @@ void CConfigManager::handleWallpaper(const std::string& COMMAND, const std::stri bool contain = false; - if (WALLPAPER[0] == '~') { - static const char* const ENVHOME = getenv("HOME"); - WALLPAPER = std::string(ENVHOME) + WALLPAPER.substr(1); - } - if (WALLPAPER.find("contain:") == 0) { WALLPAPER = WALLPAPER.substr(8); contain = true; } + if (WALLPAPER[0] == '~') { + static const char* const ENVHOME = getenv("HOME"); + WALLPAPER = std::string(ENVHOME) + WALLPAPER.substr(1); + } + if (!std::filesystem::exists(WALLPAPER)) { parseError = "wallpaper failed (no such file)"; return;