Skip to content

Commit

Permalink
return just the base on config not found
Browse files Browse the repository at this point in the history
  • Loading branch information
fufexan committed Jul 9, 2024
1 parent e73ddfe commit a5afa58
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/path/Path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a5afa58

Please sign in to comment.