Skip to content

Commit

Permalink
search jpaths from right to left, compatibility with cpp (bazelbuild#140
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sparkprime committed Nov 3, 2017
1 parent 4356f42 commit dbc7fb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (importer *FileImporter) Import(dir, importedPath string) *ImportedData {
return &ImportedData{err: err}
}

for i := 0; !found && i < len(importer.JPaths); i++ {
for i := len(importer.JPaths) - 1; !found && i >= 0; i-- {
found, content, foundHere, err = tryPath(importer.JPaths[i], importedPath)
if err != nil {
return &ImportedData{err: err}
Expand Down

0 comments on commit dbc7fb3

Please sign in to comment.