fix bug introduced by commit eaa37413

When I refactored the code to reduce redundancy and improve the error
messages when the config or data directories could not be used I botched
the customization of the $HOME based data path.
This commit is contained in:
Kurtis Rader 2016-12-03 18:38:00 -08:00
parent 4288db9d39
commit 45d3a705be

View file

@ -266,7 +266,7 @@ static void path_create(wcstring &path, const wcstring &xdg_var, const wcstring
} else { } else {
const env_var_t home = env_get_string(L"HOME", ENV_GLOBAL | ENV_EXPORT); const env_var_t home = env_get_string(L"HOME", ENV_GLOBAL | ENV_EXPORT);
if (!home.missing_or_empty()) { if (!home.missing_or_empty()) {
path = home + L"/.config/fish"; path = home + (which_dir == L"config" ? L"/.config/fish" : L"/.local/share/fish");
if (create_directory(path) != -1) { if (create_directory(path) != -1) {
path_done = true; path_done = true;
} else { } else {