From 7e592f31c5d4cf4a5ce0c6299bd84b3877bd0369 Mon Sep 17 00:00:00 2001 From: O3H Date: Thu, 24 Oct 2024 20:15:19 +0100 Subject: [PATCH] fix select game button not working in list view --- backend/util.go | 15 +++++++-------- frontend/src/views/GameSelection.vue | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/backend/util.go b/backend/util.go index 0da539e..fa72b3c 100644 --- a/backend/util.go +++ b/backend/util.go @@ -10,19 +10,18 @@ import ( func WalkDirExt(root string, exts []string) ([]string, error) { var files []string err := filepath.WalkDir(root, func(path string, d fs.DirEntry, err error) error { - if d.IsDir() { - return nil - } - - for _, s := range exts { - if strings.HasSuffix(path, "."+s) { - files = append(files, path) - return nil + if !d.IsDir() { + for _, s := range exts { + if strings.HasSuffix(path, "."+s) { + files = append(files, path) + return nil + } } } return nil }) + return files, err } diff --git a/frontend/src/views/GameSelection.vue b/frontend/src/views/GameSelection.vue index a7134b9..49081c3 100644 --- a/frontend/src/views/GameSelection.vue +++ b/frontend/src/views/GameSelection.vue @@ -369,7 +369,7 @@ onMounted(async () => {