diff options
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
| -rw-r--r-- | Source/Core/Common/FileUtil.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 4709c011b2..5fdac9e0ac 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -12,9 +12,11 @@ #include <vector> #include <sys/stat.h> +#include "Common/CommonFuncs.h" #include "Common/CommonPaths.h" #include "Common/CommonTypes.h" #include "Common/FileUtil.h" +#include "Common/Logging/Log.h" #ifdef _WIN32 #include <commdlg.h> // for GetSaveFileName @@ -499,6 +501,7 @@ FSTEntry ScanDirectoryTree(const std::string &directory, bool recursive) entry = ScanDirectoryTree(physical_name, true); else entry.size = 0; + parent_entry.size += entry.size; } else { @@ -731,8 +734,12 @@ std::string& GetExeDirectory() if (DolphinPath.empty()) { TCHAR Dolphin_exe_Path[2048]; + TCHAR Dolphin_exe_Clean_Path[MAX_PATH]; GetModuleFileName(nullptr, Dolphin_exe_Path, 2048); - DolphinPath = TStrToUTF8(Dolphin_exe_Path); + if (_tfullpath(Dolphin_exe_Clean_Path, Dolphin_exe_Path, MAX_PATH) != nullptr) + DolphinPath = TStrToUTF8(Dolphin_exe_Clean_Path); + else + DolphinPath = TStrToUTF8(Dolphin_exe_Path); DolphinPath = DolphinPath.substr(0, DolphinPath.find_last_of('\\')); } return DolphinPath; |
