diff options
author | 6543 <6543@obermui.de> | 2020-01-05 15:27:25 +0100 |
---|---|---|
committer | Antoine GIRARD <sapk@users.noreply.github.com> | 2020-01-05 15:27:25 +0100 |
commit | a5a79f702d79b4288d6b214fc9f83ed725edf385 (patch) | |
tree | 2f0082aebe0a9b38b6d12fda361e43e0ad45a9b3 /vendor/gopkg.in/ini.v1/key.go | |
parent | 4f54a4628a6d8871451a8cce9b1a8dbb1c1583ed (diff) | |
download | gitea-a5a79f702d79b4288d6b214fc9f83ed725edf385.tar.gz gitea-a5a79f702d79b4288d6b214fc9f83ed725edf385.zip |
update gitea.com/macaron/macaron to 1.4.0 (#9608)
Diffstat (limited to 'vendor/gopkg.in/ini.v1/key.go')
-rw-r--r-- | vendor/gopkg.in/ini.v1/key.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vendor/gopkg.in/ini.v1/key.go b/vendor/gopkg.in/ini.v1/key.go index 62f9146990..3c197410fa 100644 --- a/vendor/gopkg.in/ini.v1/key.go +++ b/vendor/gopkg.in/ini.v1/key.go @@ -147,10 +147,15 @@ func (k *Key) transformValue(val string) string { noption := vr[2 : len(vr)-2] // Search in the same section. + // If not found or found the key itself, then search again in default section. nk, err := k.s.GetKey(noption) if err != nil || k == nk { - // Search again in default section. nk, _ = k.s.f.Section("").GetKey(noption) + if nk == nil { + // Stop when no results found in the default section, + // and returns the value as-is. + break + } } // Substitute by new value and take off leading '%(' and trailing ')s'. |