fix: invalid --v2ray-assetsdir. #649

This commit is contained in:
mzz2017 committed 2022-09-10 01:04:48 +08:00
1 parent 246f7b30af
commit 71a231e543
1 file changed
+9
+9
View File
@@ -20,6 +20,15 @@ import (
)
func GetV2rayLocationAssetOverride() string {
if assetDir := conf.GetEnvironmentConfig().V2rayAssetsDirectory; assetDir != "" {
return assetDir
}
if assetDir := os.Getenv("V2RAY_LOCATION_ASSET"); assetDir != "" {
return assetDir
}
if assetDir := os.Getenv("XRAY_LOCATION_ASSET"); assetDir != "" {
return assetDir
}
if runtime.GOOS != "windows" {
return filepath.Join(xdg.RuntimeDir, "v2raya")
} else {