mirror of
https://github.com/hyprwm/hyprutils.git
synced 2024-11-17 00:15:58 +01:00
return just the base on config not found
This commit is contained in:
parent
e73ddfe051
commit
a5afa58175
1 changed files with 4 additions and 0 deletions
|
@ -48,12 +48,16 @@ namespace Hyprutils::Path {
|
||||||
if (xdgConfigHome.has_value()) {
|
if (xdgConfigHome.has_value()) {
|
||||||
if (checkConfigExists(xdgConfigHome.value(), programName))
|
if (checkConfigExists(xdgConfigHome.value(), programName))
|
||||||
return std::make_pair(fullConfigPath(xdgConfigHome.value(), programName), xdgConfigHome);
|
return std::make_pair(fullConfigPath(xdgConfigHome.value(), programName), xdgConfigHome);
|
||||||
|
else
|
||||||
|
return std::make_pair(std::nullopt, xdgConfigHome);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const auto home = getHome();
|
static const auto home = getHome();
|
||||||
if (home.has_value()) {
|
if (home.has_value()) {
|
||||||
if (checkConfigExists(home.value(), programName))
|
if (checkConfigExists(home.value(), programName))
|
||||||
return std::make_pair(fullConfigPath(home.value(), programName), home);
|
return std::make_pair(fullConfigPath(home.value(), programName), home);
|
||||||
|
else
|
||||||
|
return std::make_pair(std::nullopt, home);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const auto xdgConfigDirs = getXdgConfigDirs();
|
static const auto xdgConfigDirs = getXdgConfigDirs();
|
||||||
|
|
Loading…
Reference in a new issue