Skip to content

Commit

Permalink
Use path not filepath for package parents (#264)
Browse files Browse the repository at this point in the history
We're using this to find the parent of a package, not a filesystem path,
and packages always use `/`.

Fixes #260
Closes #261
  • Loading branch information
illicitonion authored May 3, 2024
1 parent 603fb5c commit 2e6e068
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion java/gazelle/javaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package javaconfig

import (
"fmt"
"path"
"path/filepath"
"strings"

Expand Down Expand Up @@ -78,7 +79,7 @@ func (c *Config) NewChild() *Config {

// ParentForPackage returns the parent Config for the given Bazel package.
func (c *Configs) ParentForPackage(pkg string) *Config {
dir := filepath.Dir(pkg)
dir := path.Dir(pkg)
if dir == "." {
dir = ""
}
Expand Down

0 comments on commit 2e6e068

Please sign in to comment.