From 56781b5d1a3bae471014878364944273caf9eac8 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Sat, 14 Feb 2026 18:34:26 -0700 Subject: [PATCH] Fix a issue with folders that don't exist not showing an error --- src/lib/Util.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/Util.ts b/src/lib/Util.ts index a216721..e4454a0 100644 --- a/src/lib/Util.ts +++ b/src/lib/Util.ts @@ -11,11 +11,20 @@ export const openFolder = async (name: string) => { const folderExists = await exists(relativePath, { baseDir: BaseDirectory.AppLocalData }) + + if (!folderExists) { + await message(`Game folder "${absolutePath}" not found.`, { + title: 'Folder not found', + kind: 'error' + }) + return + } + const folderStat = await stat(relativePath, { baseDir: BaseDirectory.AppLocalData }) - if (!folderExists || folderStat.isFile) { + if (folderStat.isFile) { await message(`Game folder "${absolutePath}" not found.`, { title: 'Folder not found', kind: 'error'