Skip to content

Commit

Permalink
Fix Windows API for default data directory with wide characters
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrossignol committed Sep 8, 2020
1 parent 87a4fa5 commit 51b2312
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,12 +1016,12 @@ fs::path GetSpecialFolderPath(int nFolder, bool fCreate)
{
char pszPath[MAX_PATH] = "";

if(SHGetSpecialFolderPathA(NULL, pszPath, nFolder, fCreate))
if (SHGetSpecialFolderPathW(NULL, pszPath, nFolder, fCreate))
{
return fs::path(pszPath);
}

LogPrintf("SHGetSpecialFolderPathA() failed, could not obtain requested path.");
LogPrintf("SHGetSpecialFolderPathW() failed, could not obtain requested path.");
return fs::path("");
}
#endif
Expand Down

0 comments on commit 51b2312

Please sign in to comment.