diff options
author | boludoz <francomaro@gmail.com> | 2023-10-16 23:42:45 -0300 |
---|---|---|
committer | boludoz <francomaro@gmail.com> | 2023-10-16 23:42:45 -0300 |
commit | 1afe6d51eed4a420bb7289955333a2bb10c06b99 (patch) | |
tree | b1baaf7033bff02d09132c136010802499cd3792 /src/common/fs | |
parent | 1ae0f0f3f64446b3128da0f1b1151d95739c9a6e (diff) |
More @liamwhite suggestions applied.
Diffstat (limited to 'src/common/fs')
-rw-r--r-- | src/common/fs/path_util.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index 60c5e477e..732c1559f 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -252,29 +252,23 @@ void SetYuzuPath(YuzuPath yuzu_path, const fs::path& new_path) { fs::path GetExeDirectory() { WCHAR exe_path[MAX_PATH]; - if (SUCCEEDED(GetModuleFileNameW(nullptr, exe_path, MAX_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"); } - + LOG_ERROR(Common_Filesystem, "Failed to get the path to the executable of the current " + "process"); return fs::path{}; } fs::path GetAppDataRoamingDirectory() { PWSTR appdata_roaming_path = nullptr; - if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, NULL, &appdata_roaming_path))) { std::wstring wide_appdata_roaming_path(appdata_roaming_path); CoTaskMemFree(appdata_roaming_path); return fs::path{Common::UTF16ToUTF8(wide_appdata_roaming_path)}; - } else { - LOG_ERROR(Common_Filesystem, "Failed to get the path to the %APPDATA% directory"); } - + LOG_ERROR(Common_Filesystem, "Failed to get the path to the %APPDATA% directory"); return fs::path{}; } |