allow normalized env name for asset location. fix #702

pull/703/merge
Darien Raymond 2017-11-11 15:23:42 +01:00
parent e88bea0ee6
commit 901d13ca76
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 2 additions and 1 deletions

View File

@ -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 ""