Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
e430de33
Commit
e430de33
authored
Oct 14, 2016
by
astaxie
Committed by
GitHub
Oct 14, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2223 from tailnode/develop
修复windows上app.conf中include其他配置文件时找不到文件的BUG
parents
41633900
2b442e84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
ini.go
config/ini.go
+3
-2
No files found.
config/ini.go
View file @
e430de33
...
...
@@ -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
!
file
path
.
IsAbs
(
otherfile
)
{
otherfile
=
filepath
.
Join
(
file
path
.
Dir
(
name
),
otherfile
)
}
i
,
err
:=
ini
.
parseFile
(
otherfile
)
if
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment