diff options
| author | JosJuice <josjuice@gmail.com> | 2016-11-29 18:34:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-29 18:34:22 +0100 |
| commit | 3cfc49a613a0f8e137c251694c97f0f3589f3216 (patch) | |
| tree | 158c4deb49e146888d1c1c0c8dd2252a7a8d7a01 /Source/Core/Common/FileUtil.cpp | |
| parent | 97ebb02a07dcbaf9efaab3f084cb8cb917b53ef5 (diff) | |
| parent | 0c6fd47460cb59c1b58c8870a4d2f05c23d8f357 (diff) | |
Merge pull request #4472 from JosJuice/revert-absolute-path
IOS HLE: Replace broken path traversal prevention
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
| -rw-r--r-- | Source/Core/Common/FileUtil.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index acf154f81a..e761f3ade1 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -5,7 +5,6 @@ #include <algorithm> #include <cstddef> #include <cstdio> -#include <cstdlib> #include <cstring> #include <fcntl.h> #include <limits.h> @@ -31,6 +30,7 @@ #include <dirent.h> #include <errno.h> #include <libgen.h> +#include <stdlib.h> #include <unistd.h> #endif @@ -712,19 +712,6 @@ std::string GetBundleDirectory() } #endif -std::string GetAbsolutePath(const std::string& path) -{ -#ifdef _WIN32 - wchar_t absolute_path[_MAX_PATH]; - wchar_t* result = _wfullpath(absolute_path, UTF8ToTStr(path).c_str(), _MAX_PATH); - return result ? TStrToUTF8(result) : ""; -#else - char absolute_path[MAX_PATH + 1]; - char* result = realpath(path.c_str(), absolute_path); - return result ? result : ""; -#endif -} - std::string& GetExeDirectory() { static std::string DolphinPath; |
