Always use the right user dir on windows.

This commit is contained in:
rog 2012-12-26 19:55:45 -05:00
parent db5f4c8c20
commit 94116bf89c
1 changed files with 1 additions and 2 deletions

View File

@ -649,8 +649,7 @@ std::string &GetUserPath(const unsigned int DirIDX, const std::string &newPath)
if (paths[D_USER_IDX].empty()) if (paths[D_USER_IDX].empty())
{ {
#ifdef _WIN32 #ifdef _WIN32
// TODO: use GetExeDirectory() here instead of ROOT_DIR so that if the cwd is changed we still have the correct paths? paths[D_USER_IDX] = GetExeDirectory() + DIR_SEP USERDATA_DIR DIR_SEP;
paths[D_USER_IDX] = ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP;
#else #else
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;