Fix compare symlink to path

Now will compare path with path, symlink with symlink.
This commit is contained in:
Back 2016-08-24 19:58:55 +08:00 committed by GitHub
parent c6141fb671
commit 866fea3504
1 changed files with 2 additions and 2 deletions

View File

@ -992,8 +992,8 @@ func getPackagePath(curpath string) (packpath string) {
//Maybe is a symlink
wg, _ = filepath.EvalSymlinks(path.Join(wg, "src"))
if filepath.HasPrefix(strings.ToLower(curpath), strings.ToLower(wg)) {
cur,_ := filepath.EvalSymlinks(curpath)
if filepath.HasPrefix(strings.ToLower(cur), strings.ToLower(wg)) {
haspath = true
appsrcpath = wg
break