diff options
author | boludoz <francomaro@gmail.com> | 2023-10-16 08:26:40 +0200 |
---|---|---|
committer | boludoz <francomaro@gmail.com> | 2023-10-16 08:26:40 +0200 |
commit | 26417da5d36ea5aae4410a5c35405e27f39661d2 (patch) | |
tree | 52389e95589cf6ec21a62495093691498c470815 /src/common/fs/path_util.cpp | |
parent | Less code, simpler, better. (diff) | |
download | yuzu-26417da5d36ea5aae4410a5c35405e27f39661d2.tar yuzu-26417da5d36ea5aae4410a5c35405e27f39661d2.tar.gz yuzu-26417da5d36ea5aae4410a5c35405e27f39661d2.tar.bz2 yuzu-26417da5d36ea5aae4410a5c35405e27f39661d2.tar.lz yuzu-26417da5d36ea5aae4410a5c35405e27f39661d2.tar.xz yuzu-26417da5d36ea5aae4410a5c35405e27f39661d2.tar.zst yuzu-26417da5d36ea5aae4410a5c35405e27f39661d2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/fs/path_util.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index 3d88fcf4f..bcd64156e 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -254,11 +254,8 @@ fs::path GetExeDirectory() { WCHAR exe_path[MAX_PATH]; if (SUCCEEDED(GetModuleFileNameW(nullptr, exe_path, MAX_PATH))) { - std::wstring wideExePath(exe_path); - - // UTF-16 filesystem lib to UTF-8 is broken, so we need to convert to UTF-8 with the with - // the Windows library (Filesystem converts the strings literally). - return fs::path{Common::UTF16ToUTF8(wideExePath)}.parent_path(); + std::wstring wide_exe_path(exe_path); + return fs::path{Common::UTF16ToUTF8(wide_exe_path)}.parent_path(); } else { LOG_ERROR(Common_Filesystem, "Failed to get the path to the executable of the current " "process"); @@ -273,9 +270,6 @@ fs::path GetAppDataRoamingDirectory() { if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, NULL, &appdata_roaming_path))) { std::wstring wideAppdataRoamingPath(appdata_roaming_path); CoTaskMemFree(appdata_roaming_path); - - // UTF-16 filesystem lib to UTF-8 is broken, so we need to convert to UTF-8 with the with - // the Windows library (Filesystem converts the strings literally). return fs::path{Common::UTF16ToUTF8(wideAppdataRoamingPath)}; } else { LOG_ERROR(Common_Filesystem, "Failed to get the path to the %APPDATA% directory"); |