From 2b7fdef2031b14743f8a38c52cc6b957f398d31e Mon Sep 17 00:00:00 2001 From: V2Ray Date: Thu, 17 Sep 2015 11:24:19 +0200 Subject: [PATCH] Fix config file path resolution for Windows --- release/server/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/release/server/main.go b/release/server/main.go index b1749ca7e..e14aec0da 100644 --- a/release/server/main.go +++ b/release/server/main.go @@ -3,7 +3,7 @@ package main import ( "flag" "io/ioutil" - "path" + "path/filepath" "github.com/v2ray/v2ray-core" "github.com/v2ray/v2ray-core/log" @@ -45,12 +45,12 @@ func main() { panic(log.Error("Failed to parse Config: %v", err)) } - if !path.IsAbs(vconfig.InboundConfig.File) && len(vconfig.InboundConfig.File) > 0 { - vconfig.InboundConfig.File = path.Join(path.Dir(*configFile), vconfig.InboundConfig.File) + if !filepath.IsAbs(vconfig.InboundConfig.File) && len(vconfig.InboundConfig.File) > 0 { + vconfig.InboundConfig.File = filepath.Join(filepath.Dir(*configFile), vconfig.InboundConfig.File) } - if !path.IsAbs(vconfig.OutboundConfig.File) && len(vconfig.OutboundConfig.File) > 0 { - vconfig.OutboundConfig.File = path.Join(path.Dir(*configFile), vconfig.OutboundConfig.File) + if !filepath.IsAbs(vconfig.OutboundConfig.File) && len(vconfig.OutboundConfig.File) > 0 { + vconfig.OutboundConfig.File = filepath.Join(filepath.Dir(*configFile), vconfig.OutboundConfig.File) } vPoint, err := core.NewPoint(vconfig)