summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {
92 return if (DocumentsTree.isNativePath(path!!)) { 92 return if (DocumentsTree.isNativePath(path!!)) {
93 YuzuApplication.documentsTree!!.exists(path) 93 YuzuApplication.documentsTree!!.exists(path)
94 } else { 94 } else {
95 FileUtil.exists(path) 95 FileUtil.exists(path, suppressLog = true)
96 } 96 }
97 } 97 }
98 98
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 {
144 * @param path Native content uri path 144 * @param path Native content uri path
145 * @return bool 145 * @return bool
146 */ 146 */
147 fun exists(path: String?): Boolean { 147 fun exists(path: String?, suppressLog: Boolean = false): Boolean {
148 var c: Cursor? = null 148 var c: Cursor? = null
149 try { 149 try {
150 val mUri = Uri.parse(path) 150 val mUri = Uri.parse(path)
@@ -152,7 +152,9 @@ object FileUtil {
152 c = context.contentResolver.query(mUri, columns, null, null, null) 152 c = context.contentResolver.query(mUri, columns, null, null, null)
153 return c!!.count > 0 153 return c!!.count > 0
154 } catch (e: Exception) { 154 } catch (e: Exception) {
155 Log.info("[FileUtil] Cannot find file from given path, error: " + e.message) 155 if (!suppressLog) {
156 Log.info("[FileUtil] Cannot find file from given path, error: " + e.message)
157 }
156 } finally { 158 } finally {
157 closeQuietly(c) 159 closeQuietly(c)
158 } 160 }