If the HOME environment variable isn't set, fall back on to PWD. Closes 5584.
This commit is contained in:
parent
532fdada96
commit
3b559d89ec
|
@ -649,7 +649,7 @@ std::string &GetUserPath(const unsigned int DirIDX, const std::string &newPath)
|
||||||
if (File::Exists(ROOT_DIR DIR_SEP USERDATA_DIR))
|
if (File::Exists(ROOT_DIR DIR_SEP USERDATA_DIR))
|
||||||
paths[D_USER_IDX] = ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP;
|
paths[D_USER_IDX] = ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP;
|
||||||
else
|
else
|
||||||
paths[D_USER_IDX] = std::string(getenv("HOME")) + DIR_SEP DOLPHIN_DATA_DIR DIR_SEP;
|
paths[D_USER_IDX] = std::string(getenv("HOME") ? getenv("HOME") : getenv("PWD")) + DIR_SEP DOLPHIN_DATA_DIR DIR_SEP;
|
||||||
#endif
|
#endif
|
||||||
INFO_LOG(COMMON, "GetUserPath: Setting user directory to %s:", paths[D_USER_IDX].c_str());
|
INFO_LOG(COMMON, "GetUserPath: Setting user directory to %s:", paths[D_USER_IDX].c_str());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue