mirror of
				https://github.com/beego/bee.git
				synced 2025-10-31 17:33:26 +00:00 
			
		
		
		
	Merge 866fea3504 into 932f16ba4e
				
					
				
			This commit is contained in:
		
							
								
								
									
										12
									
								
								g_appcode.go
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								g_appcode.go
									
									
									
									
									
								
							| @@ -962,13 +962,21 @@ func getPackagePath(curpath string) (packpath string) { | |||||||
| 	wgopath := filepath.SplitList(gopath) | 	wgopath := filepath.SplitList(gopath) | ||||||
|  |  | ||||||
| 	for _, wg := range wgopath { | 	for _, wg := range wgopath { | ||||||
| 		wg, _ = filepath.EvalSymlinks(path.Join(wg, "src")) | 		//Maybe is a path | ||||||
|  |  | ||||||
| 		if filepath.HasPrefix(strings.ToLower(curpath), strings.ToLower(wg)) { | 		if filepath.HasPrefix(strings.ToLower(curpath), strings.ToLower(wg)) { | ||||||
| 			haspath = true | 			haspath = true | ||||||
| 			appsrcpath = wg | 			appsrcpath = wg | ||||||
| 			break | 			break | ||||||
| 		} | 		} | ||||||
|  | 		 | ||||||
|  | 		//Maybe is a symlink | ||||||
|  | 		wg, _ = filepath.EvalSymlinks(path.Join(wg, "src")) | ||||||
|  | 		cur,_ := filepath.EvalSymlinks(curpath) | ||||||
|  | 		if filepath.HasPrefix(strings.ToLower(cur), strings.ToLower(wg)) { | ||||||
|  | 			haspath = true | ||||||
|  | 			appsrcpath = wg | ||||||
|  | 			break | ||||||
|  | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	if !haspath { | 	if !haspath { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Back Yu
					Back Yu