summaryrefslogtreecommitdiffstats
path: root/src/android
diff options
context:
space:
mode:
authorCharles Lombardo <clombardo169@gmail.com>2023-10-29 17:43:09 +0100
committerCharles Lombardo <clombardo169@gmail.com>2023-10-30 16:38:10 +0100
commitf04bc172ae4a24ae4431d65eabfedcc8667eb0bd (patch)
tree3eaac7c7fe07db8b44893341ec885e4dfc31d8c8 /src/android
parentandroid: Fix resolving android URIs in native code (diff)
downloadyuzu-f04bc172ae4a24ae4431d65eabfedcc8667eb0bd.tar
yuzu-f04bc172ae4a24ae4431d65eabfedcc8667eb0bd.tar.gz
yuzu-f04bc172ae4a24ae4431d65eabfedcc8667eb0bd.tar.bz2
yuzu-f04bc172ae4a24ae4431d65eabfedcc8667eb0bd.tar.lz
yuzu-f04bc172ae4a24ae4431d65eabfedcc8667eb0bd.tar.xz
yuzu-f04bc172ae4a24ae4431d65eabfedcc8667eb0bd.tar.zst
yuzu-f04bc172ae4a24ae4431d65eabfedcc8667eb0bd.zip
Diffstat (limited to 'src/android')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt2
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt
index 5fe235dba..e2c5b6acd 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt
@@ -92,7 +92,7 @@ object NativeLibrary {
return if (DocumentsTree.isNativePath(path!!)) {
YuzuApplication.documentsTree!!.exists(path)
} else {
- FileUtil.exists(path)
+ FileUtil.exists(path, suppressLog = true)
}
}
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt
index 5ee74a52c..8c3268e9c 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/FileUtil.kt
@@ -144,7 +144,7 @@ object FileUtil {
* @param path Native content uri path
* @return bool
*/
- fun exists(path: String?): Boolean {
+ fun exists(path: String?, suppressLog: Boolean = false): Boolean {
var c: Cursor? = null
try {
val mUri = Uri.parse(path)
@@ -152,7 +152,9 @@ object FileUtil {
c = context.contentResolver.query(mUri, columns, null, null, null)
return c!!.count > 0
} catch (e: Exception) {
- Log.info("[FileUtil] Cannot find file from given path, error: " + e.message)
+ if (!suppressLog) {
+ Log.info("[FileUtil] Cannot find file from given path, error: " + e.message)
+ }
} finally {
closeQuietly(c)
}