From 6b3ff6f980fdda4bd3093622896734df07c466c8 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Mon, 2 Nov 2015 21:07:26 +0100 Subject: [PATCH] Fixed list item computation for ini file, especially with included ini file. --- library/configuration/src/ini_config.e | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/library/configuration/src/ini_config.e b/library/configuration/src/ini_config.e index 4922623..0456e43 100644 --- a/library/configuration/src/ini_config.e +++ b/library/configuration/src/ini_config.e @@ -442,7 +442,17 @@ feature {NONE} -- Implementation j := k.index_of (']', i + 1) if j = i + 1 then -- ends_with "[]" k.keep_head (i - 1) - if attached {LIST [STRING_8]} items.item (k) as l_list then + if + a_section_prefix /= Void and then + attached {LIST [STRING_8]} items.item (a_section_prefix + {STRING_32} "." + k) as l_list + then + lst := l_list + elseif + attached last_section_name as l_section_prefix and then + attached {LIST [STRING_8]} items.item (l_section_prefix + {STRING_32} "." + k) as l_list + then + lst := l_list + elseif attached {LIST [STRING_8]} items.item (k) as l_list then lst := l_list else create {ARRAYED_LIST [STRING_8]} lst.make (1)