Skip to content

Commit 2e6e068

Browse files
authored
Use path not filepath for package parents (#264)
We're using this to find the parent of a package, not a filesystem path, and packages always use `/`. Fixes #260 Closes #261
1 parent 603fb5c commit 2e6e068

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/gazelle/javaconfig/config.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package javaconfig
22

33
import (
44
"fmt"
5+
"path"
56
"path/filepath"
67
"strings"
78

@@ -78,7 +79,7 @@ func (c *Config) NewChild() *Config {
7879

7980
// ParentForPackage returns the parent Config for the given Bazel package.
8081
func (c *Configs) ParentForPackage(pkg string) *Config {
81-
dir := filepath.Dir(pkg)
82+
dir := path.Dir(pkg)
8283
if dir == "." {
8384
dir = ""
8485
}

0 commit comments

Comments
 (0)