From 9ef42040afc83789671580c02f428c96804f3215 Mon Sep 17 00:00:00 2001 From: SachinVin <26602104+SachinVin@users.noreply.github.com> Date: Sun, 26 Mar 2023 23:54:44 +0530 Subject: [PATCH] GameDatabase.java: Fix file exists check on SAF (#6374) Doesn't really do much other than reduce log spam --- .../src/main/java/org/citra/citra_emu/model/GameDatabase.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/android/app/src/main/java/org/citra/citra_emu/model/GameDatabase.java b/src/android/app/src/main/java/org/citra/citra_emu/model/GameDatabase.java index f4086386f8..4a67c9a1ac 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/model/GameDatabase.java +++ b/src/android/app/src/main/java/org/citra/citra_emu/model/GameDatabase.java @@ -125,9 +125,8 @@ public final class GameDatabase extends SQLiteOpenHelper { while (fileCursor.moveToNext()) { String gamePath = fileCursor.getString(GAME_COLUMN_PATH); - File game = new File(gamePath); - if (!game.exists()) { + if (!FileUtil.Exists(mContext, gamePath)) { Log.error("[GameDatabase] Game file no longer exists. Removing from the library: " + gamePath); database.delete(TABLE_NAME_GAMES,