summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar liamwhite2024-01-26 10:23:08 -0500
committerGravatar GitHub2024-01-26 10:23:08 -0500
commitbd8635e26a653739da5052143f7ec847f5537520 (patch)
treef401af72c6b49003daf5dd971a7b9503a72e980f
parentMerge pull request #12769 from german77/no-log (diff)
parentvfs: Fix getting URI filename (diff)
downloadyuzu-bd8635e26a653739da5052143f7ec847f5537520.tar.gz
yuzu-bd8635e26a653739da5052143f7ec847f5537520.tar.xz
yuzu-bd8635e26a653739da5052143f7ec847f5537520.zip
Merge pull request #12808 from t895/uri-moment
vfs: Fix getting URI filename
-rw-r--r--src/core/file_sys/vfs/vfs_real.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/file_sys/vfs/vfs_real.cpp b/src/core/file_sys/vfs/vfs_real.cpp
index 627d5d251..3ad073e4a 100644
--- a/src/core/file_sys/vfs/vfs_real.cpp
+++ b/src/core/file_sys/vfs/vfs_real.cpp
@@ -20,6 +20,10 @@
20#define stat _stat64 20#define stat _stat64
21#endif 21#endif
22 22
23#ifdef ANDROID
24#include "common/fs/fs_android.h"
25#endif
26
23namespace FileSys { 27namespace FileSys {
24 28
25namespace FS = Common::FS; 29namespace FS = Common::FS;
@@ -274,6 +278,11 @@ RealVfsFile::~RealVfsFile() {
274} 278}
275 279
276std::string RealVfsFile::GetName() const { 280std::string RealVfsFile::GetName() const {
281#ifdef ANDROID
282 if (path[0] != '/') {
283 return FS::Android::GetFilename(path);
284 }
285#endif
277 return path_components.empty() ? "" : std::string(path_components.back()); 286 return path_components.empty() ? "" : std::string(path_components.back());
278} 287}
279 288