Skip to content

Commit

Permalink
Remove call to deprecated filepath.HasPrefix
Browse files Browse the repository at this point in the history
  • Loading branch information
zer0tonin committed Nov 13, 2023
1 parent 69979eb commit 4d7bc58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/browser/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"
"path/filepath"
"sort"
"strings"

"github.com/lithammer/fuzzysearch/fuzzy"
"github.com/spf13/viper"
Expand Down Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 4d7bc58

Please sign in to comment.