mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 19:45:46 +00:00
android: Fix resolving android URIs in native code
This commit is contained in:
parent
8500e7bc8f
commit
df17162f9c
7 changed files with 117 additions and 11 deletions
|
@ -401,6 +401,16 @@ std::string SanitizePath(std::string_view path_, DirectorySeparator directory_se
|
|||
}
|
||||
|
||||
std::string_view GetParentPath(std::string_view path) {
|
||||
if (path.empty()) {
|
||||
return path;
|
||||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
if (path[0] != '/') {
|
||||
std::string path_string{path};
|
||||
return FS::Android::GetParentDirectory(path_string);
|
||||
}
|
||||
#endif
|
||||
const auto name_bck_index = path.rfind('\\');
|
||||
const auto name_fwd_index = path.rfind('/');
|
||||
std::size_t name_index;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue