From 2b442e842ea6ced081e13896dc41952467d0f5dd Mon Sep 17 00:00:00 2001 From: mengyuan Date: Fri, 14 Oct 2016 16:52:03 +0800 Subject: [PATCH] fix path issue in windows --- config/ini.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/ini.go b/config/ini.go index 9371fe61..b3332bd8 100644 --- a/config/ini.go +++ b/config/ini.go @@ -23,6 +23,7 @@ import ( "io/ioutil" "os" "path" + "path/filepath" "strconv" "strings" "sync" @@ -132,8 +133,8 @@ func (ini *IniConfig) parseFile(name string) (*IniConfigContainer, error) { includefiles := strings.Fields(key) if includefiles[0] == "include" && len(includefiles) == 2 { otherfile := strings.Trim(includefiles[1], "\"") - if !path.IsAbs(otherfile) { - otherfile = path.Join(path.Dir(name), otherfile) + if !filepath.IsAbs(otherfile) { + otherfile = filepath.Join(filepath.Dir(name), otherfile) } i, err := ini.parseFile(otherfile) if err != nil {