Skip to content

Commit

Permalink
fixed glitch when looking up files
Browse files Browse the repository at this point in the history
that have the same name across relative directories.
  • Loading branch information
daveshanley committed Nov 14, 2024
1 parent ff5c4e6 commit c757033
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index/search_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,13 @@ func (index *SpecIndex) SearchIndexForReferenceByReferenceWithContext(ctx contex
if strings.Contains(roloLookup, "#") {
roloLookup = strings.Split(roloLookup, "#")[0]
}
if filepath.Base(roloLookup) == index.GetSpecFileName() {

b := filepath.Base(roloLookup)
sfn := index.GetSpecFileName()

abp := index.GetSpecAbsolutePath()

if b == sfn && roloLookup == abp {
return nil, index, ctx
}
rFile, err := index.rolodex.Open(roloLookup)
Expand Down

0 comments on commit c757033

Please sign in to comment.