From 4d7bc585a9bab1b71b1b1621e4cec33a0e56642b Mon Sep 17 00:00:00 2001 From: Alice GG Date: Mon, 13 Nov 2023 12:32:35 +0100 Subject: [PATCH] Remove call to deprecated filepath.HasPrefix --- backend/browser/utils.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/browser/utils.go b/backend/browser/utils.go index 92ddd08..5be189f 100644 --- a/backend/browser/utils.go +++ b/backend/browser/utils.go @@ -5,6 +5,7 @@ import ( "os" "path/filepath" "sort" + "strings" "github.com/lithammer/fuzzysearch/fuzzy" "github.com/spf13/viper" @@ -50,7 +51,7 @@ func browseDir(dir string) []FileDescription { func searchInDir(dir, search string) []FileDescription { children := []string{} for file := range fileCache { - if filepath.HasPrefix(file, dir) { + if strings.HasPrefix(file, dir) { children = append(children, file) } }