[config] check if XDG_CONFIG_HOME exists before using it

pull/857/head
Timothy Stack 3 years ago
parent 4f4d90a65d
commit 0b3819d16a

@ -100,7 +100,9 @@ ghc::filesystem::path dotlnav_path()
if (xdg_config_home != nullptr) {
auto xdg_path = ghc::filesystem::path(xdg_config_home);
return xdg_path / "lnav";
if (ghc::filesystem::is_directory(xdg_path)) {
return xdg_path / "lnav";
}
}
auto home_config = home_path / ".config";

Loading…
Cancel
Save