diff --git a/opensca/model/dep.go b/opensca/model/dep.go index 45d91a37..eee2f5dc 100644 --- a/opensca/model/dep.go +++ b/opensca/model/dep.go @@ -2,6 +2,7 @@ package model import ( "fmt" + "path/filepath" "sort" "strings" ) @@ -181,7 +182,7 @@ func (dep *DepGraph) Build(deep bool, lan Language) { n.Path = p.Path } if n.Name != "" { - n.Path += n.Index() + n.Path = filepath.Join(n.Path, n.Index()) } // 补全语言 if n.Language == Lan_None {