Fix a issue with folders that don't exist not showing an error

This commit is contained in:
2026-02-14 18:34:26 -07:00
parent 6ce7c2a8ae
commit 56781b5d1a

View File

@@ -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'