key: keys should not consider themselves for recursion read (#130)

This commit is contained in:
Alexandre Pauzies
2017-11-13 19:45:16 -05:00
committed by 无闻
parent a343d9870e
commit fa898e883e
+1 -1
View File
@@ -114,7 +114,7 @@ func (k *Key) transformValue(val string) string {
// Search in the same section.
nk, err := k.s.GetKey(noption)
if err != nil {
if err != nil || k == nk {
// Search again in default section.
nk, _ = k.s.f.Section("").GetKey(noption)
}