1
0
镜像自地址 https://github.com/astaxie/beego.git 已同步 2025-07-17 18:52:16 +00:00

fix path issue in windows

这个提交包含在:
mengyuan
2016-10-14 16:52:03 +08:00
父节点 41633900da
当前提交 2b442e842e

查看文件

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