Skip to content

Commit

Permalink
Merge pull request #202 from platformsh/akalipetis/issue-199
Browse files Browse the repository at this point in the history
Fix Find() when / is used as input
  • Loading branch information
akalipetis authored Feb 1, 2024
2 parents ef34530 + b3ae9dc commit c8bf6cf
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 c8bf6cf

Please sign in to comment.