Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
If the HOME environment variable isn't set, fall back on to PWD. Clos…
…es 5584.
  • Loading branch information
Sonicadvance1 committed Dec 14, 2012
1 parent 532fdad commit 3b559d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/Common/Src/FileUtil.cpp
Expand Up @@ -649,7 +649,7 @@ std::string &GetUserPath(const unsigned int DirIDX, const std::string &newPath)
if (File::Exists(ROOT_DIR DIR_SEP USERDATA_DIR))
paths[D_USER_IDX] = ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP;
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
INFO_LOG(COMMON, "GetUserPath: Setting user directory to %s:", paths[D_USER_IDX].c_str());

Expand Down

0 comments on commit 3b559d8

Please sign in to comment.