Revert "IOS HLE: Prevent accessing host file system"

This reverts commit 141f3bfb3a.
The implementation of getting absolute paths wasn't working
on non-Windows systems, which is a huge problem for IOS HLE.
This commit is contained in:
JosJuice
2016-11-24 20:57:27 +01:00
parent c84ab13e81
commit de355a8521
3 changed files with 5 additions and 43 deletions

View File

@ -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;