1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-23 04:20:49 +00:00

Merge pull request #1785 from KilledKenny/pathError

Fixed infinite loop in ini config adapter
This commit is contained in:
astaxie 2016-03-12 21:11:04 +08:00
commit 474bdd2e6b

View File

@ -82,6 +82,10 @@ func (ini *IniConfig) parseFile(name string) (*IniConfigContainer, error) {
if err == io.EOF {
break
}
//It might be a good idea to throw a error on all unknonw errors?
if _, ok := err.(*os.PathError); ok {
return nil, err
}
if bytes.Equal(line, bEmpty) {
continue
}