mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user