The GetDirectories()
and GetFolderPath()
functions in wutil.cpp are identical in a17 / a18 / 0ad. In particular that call to the windows API is identical
personalPath = GetFolderPath(CSIDL_PERSONAL);
Therefore there should be no reason why a18 crashes, but a17 doesn't, strange.
That dwFlags
argument for that API call is also 0 = SHGFP_TYPE_CURRENT
:
SHGetFolderPathW(hwnd, csidl, token, 0, path);
It should there return the current directory, in case you have redirected that folder. Therefore it should give the correct directory in theory.
Looking at that value and your screenshot, that directory seems to be okay... besides that chinese character.
We really need someone with windows 7 who can compile 0ad to reproduce and debug this.