mirror of
https://github.com/beego/bee.git
synced 2024-06-26 10:14:13 +00:00
Merge c6141fb671
into 932f16ba4e
This commit is contained in:
commit
a07319d619
|
@ -962,6 +962,14 @@ func getPackagePath(curpath string) (packpath string) {
|
||||||
wgopath := filepath.SplitList(gopath)
|
wgopath := filepath.SplitList(gopath)
|
||||||
|
|
||||||
for _, wg := range wgopath {
|
for _, wg := range wgopath {
|
||||||
|
//Maybe is a path
|
||||||
|
if filepath.HasPrefix(strings.ToLower(curpath), strings.ToLower(wg)) {
|
||||||
|
haspath = true
|
||||||
|
appsrcpath = wg
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
//Maybe is a symlink
|
||||||
wg, _ = filepath.EvalSymlinks(path.Join(wg, "src"))
|
wg, _ = filepath.EvalSymlinks(path.Join(wg, "src"))
|
||||||
|
|
||||||
if filepath.HasPrefix(strings.ToLower(curpath), strings.ToLower(wg)) {
|
if filepath.HasPrefix(strings.ToLower(curpath), strings.ToLower(wg)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user