Skip to content

Commit

Permalink
call filepath.ToSlash
Browse files Browse the repository at this point in the history
  • Loading branch information
cuixq committed Jan 20, 2025
1 parent c931bc8 commit 5213257
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/mavenutil/maven.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ func ParentPOMPath(input *filesystem.ScanInput, currentPath, relativePath string
path := filepath.Join(filepath.Dir(currentPath), relativePath)
fmt.Printf("path: %s\n", path)

info, err := input.FS.Stat(path)
info, err := input.FS.Stat(filepath.ToSlash(path))
if err == nil {
if !info.IsDir() {
return path
}
// Current path is a directory, so look for pom.xml in the directory.
path = filepath.Join(path, "pom.xml")
if _, err := input.FS.Stat(path); err == nil {
if _, err := input.FS.Stat(filepath.ToSlash(path)); err == nil {
return path
}
fmt.Println(err)
Expand Down

0 comments on commit 5213257

Please sign in to comment.