mirror of https://github.com/tstack/lnav.git
[config] check if XDG_CONFIG_HOME exists before using it
This commit is contained in:
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…
Reference in New Issue