diff --git a/common/platform/platform.go b/common/platform/platform.go index 16d146045..96fa7103a 100644 --- a/common/platform/platform.go +++ b/common/platform/platform.go @@ -53,7 +53,7 @@ func getExecutableDir() string { return filepath.Dir(exec) } -func getExecuableSubDir(dir string) func() string { +func getExecutableSubDir(dir string) func() string { return func() string { return filepath.Join(getExecutableDir(), dir) } @@ -67,7 +67,7 @@ func GetAssetLocation(file string) string { func GetPluginDirectory() string { const name = "v2ray.location.plugin" - pluginDir := EnvFlag{Name: name, AltName: NormalizeEnvName(name)}.GetValue(getExecuableSubDir("plugins")) + pluginDir := EnvFlag{Name: name, AltName: NormalizeEnvName(name)}.GetValue(getExecutableSubDir("plugins")) return pluginDir }