mirror of
https://github.com/beego/bee.git
synced 2024-11-14 01:30:55 +00:00
Merge 751baf5070
into 46fc9d75ae
This commit is contained in:
commit
abedf3febf
@ -61,7 +61,8 @@ func GetGOPATHs() []string {
|
||||
// IsInGOPATH checks whether the path is inside of any GOPATH or not
|
||||
func IsInGOPATH(thePath string) bool {
|
||||
for _, gopath := range GetGOPATHs() {
|
||||
if strings.Contains(thePath, filepath.Join(gopath, "src")) {
|
||||
b, _ := filepath.Rel(thePath, filepath.Join(gopath, "src"))
|
||||
if strings.Contains(b, "..") {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user