From a5afa58175f3946ed9f4b1a7c4726f6a6336fe84 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Tue, 9 Jul 2024 19:52:26 +0300 Subject: [PATCH] return just the base on config not found --- src/path/Path.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/path/Path.cpp b/src/path/Path.cpp index 02a49c0..41d7e58 100644 --- a/src/path/Path.cpp +++ b/src/path/Path.cpp @@ -48,12 +48,16 @@ namespace Hyprutils::Path { if (xdgConfigHome.has_value()) { if (checkConfigExists(xdgConfigHome.value(), programName)) return std::make_pair(fullConfigPath(xdgConfigHome.value(), programName), xdgConfigHome); + else + return std::make_pair(std::nullopt, xdgConfigHome); } static const auto home = getHome(); if (home.has_value()) { if (checkConfigExists(home.value(), programName)) return std::make_pair(fullConfigPath(home.value(), programName), home); + else + return std::make_pair(std::nullopt, home); } static const auto xdgConfigDirs = getXdgConfigDirs();