Skip to content

Commit

Permalink
Fix Find() when / is used as input
Browse files Browse the repository at this point in the history
Fix #199
  • Loading branch information
akalipetis committed Feb 1, 2024
1 parent 19e15b3 commit b3ae9dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions platformifier/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"os"
"path"
"path/filepath"
"strings"

"golang.org/x/exp/slices"
)
Expand Down Expand Up @@ -53,6 +54,7 @@ func (f *OSFileSystem) Find(root, name string, firstMatch bool) []string {
if root == "" {
root = "."
}
root = strings.TrimPrefix(root, "/")
found := make([]string, 0)
_ = fs.WalkDir(f.readonly(), root, func(p string, d os.DirEntry, err error) error {
if err != nil {
Expand Down

0 comments on commit b3ae9dc

Please sign in to comment.