소스 검색

allow normalized env name for asset location. fix #702

Darien Raymond 8 년 전
부모
커밋
901d13ca76
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      common/platform/platform.go

+ 2 - 1
common/platform/platform.go

@@ -46,7 +46,8 @@ func NormalizeEnvName(name string) string {
 }
 
 func GetAssetLocation(file string) string {
-	assetPath := EnvFlag{Name: "v2ray.location.asset"}.GetValue(func() string {
+	const name = "v2ray.location.asset"
+	assetPath := EnvFlag{Name: name, AltName: NormalizeEnvName(name)}.GetValue(func() string {
 		exec, err := os.Executable()
 		if err != nil {
 			return ""