From 11d3fd8de34c7be9eb46948f988649880e805a64 Mon Sep 17 00:00:00 2001 From: Chun Kuan Lee Date: Tue, 31 Jul 2018 23:03:52 +0800 Subject: [PATCH] gui: get special folder in unicode Cherry-picked from: bb6ca65f9890e8280ace32de5a37774e14705859 --- src/util.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util.cpp b/src/util.cpp index e177bb3b7cc..b283f65f7d2 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -810,14 +810,14 @@ void ShrinkDebugFile() #ifdef WIN32 fs::path GetSpecialFolderPath(int nFolder, bool fCreate) { - char pszPath[MAX_PATH] = ""; + WCHAR pszPath[MAX_PATH] = L""; - if(SHGetSpecialFolderPathA(NULL, pszPath, nFolder, fCreate)) + if(SHGetSpecialFolderPathW(nullptr, pszPath, nFolder, fCreate)) { return fs::path(pszPath); } - LogPrintf("SHGetSpecialFolderPathA() failed, could not obtain requested path.\n"); + LogPrintf("SHGetSpecialFolderPathW() failed, could not obtain requested path.\n"); return fs::path(""); } #endif