diff options
Diffstat (limited to 'src/shared/gameinfo.cpp')
| -rw-r--r-- | src/shared/gameinfo.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp index b580a226..ebeff55a 100644 --- a/src/shared/gameinfo.cpp +++ b/src/shared/gameinfo.cpp @@ -222,7 +222,13 @@ std::wstring GameInfo::getSpecialPath(LPCWSTR name) const throw windows_error("failed to look up special folder", errorcode);
}
- return temp;
+ WCHAR temp2[MAX_PATH];
+ // try to expand variables in the path, if any
+ if (::ExpandEnvironmentStringsW(temp, temp2, MAX_PATH) != 0) {
+ return temp2;
+ } else {
+ return temp;
+ }
}
} // namespace MOShared
|
