From f2fb761bacc88bf31fc2699b474d45f015e7283b Mon Sep 17 00:00:00 2001
From: t895 <clombardo169@gmail.com>
Date: Fri, 26 Jan 2024 09:08:31 -0500
Subject: [PATCH] vfs: Fix getting URI filename

---
 src/core/file_sys/vfs/vfs_real.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

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 @@
 #define stat _stat64
 #endif
 
+#ifdef ANDROID
+#include "common/fs/fs_android.h"
+#endif
+
 namespace FileSys {
 
 namespace FS = Common::FS;
@@ -274,6 +278,11 @@ RealVfsFile::~RealVfsFile() {
 }
 
 std::string RealVfsFile::GetName() const {
+#ifdef ANDROID
+    if (path[0] != '/') {
+        return FS::Android::GetFilename(path);
+    }
+#endif
     return path_components.empty() ? "" : std::string(path_components.back());
 }