Skip to content

Commit

Permalink
fix [BUG] relative unit search paths need to prefix ..\ #146
Browse files Browse the repository at this point in the history
  • Loading branch information
MeroFuruya committed Aug 17, 2023
1 parent 98c77ed commit 5a298c2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions utils/librarypath/librarypath.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ func getNewPathsFromDir(path string, paths []string, fullPath bool, rootPath str
if !utils.Contains(paths, dir) {
paths = append(paths, dir)
}
// add ..\ prefixed path -> @MeroFuruya fix #146
prefixedPath := "..\\" + dir
if !utils.Contains(paths, prefixedPath) {
paths = append(paths, prefixedPath)
}
}
return nil
})
Expand All @@ -123,6 +128,14 @@ func getNewPathsFromDir(path string, paths []string, fullPath bool, rootPath str
if !utils.Contains(paths, path) {
paths = append(paths, path)
}
// prevent variables from being prefixed
if !strings.HasPrefix(path, "$") {
// add ..\ prefixed path -> @MeroFuruya fix #146
prefixedPath := "..\\" + path
if !utils.Contains(paths, prefixedPath) {
paths = append(paths, prefixedPath)
}
}
}
return cleanEmpty(paths)
}

0 comments on commit 5a298c2

Please sign in to comment.