diff options
Diffstat (limited to 'lib/getopts.lua')
-rw-r--r-- | lib/getopts.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/getopts.lua b/lib/getopts.lua index 874d70d..0579bd3 100644 --- a/lib/getopts.lua +++ b/lib/getopts.lua @@ -87,6 +87,10 @@ function setoptsinfile (file, search_section, search_name, value, to_table, opti for line in string.gmatch(file, "([^\n]*)\n") do conf_file[#conf_file + 1] = line end + local extra = string.match(file,"([^\n]*)$") + if extra ~= "" then + conf_file[#conf_file + 1] = extra + end end local new_conf_file = {} local section = "" @@ -163,6 +167,10 @@ function getoptsfromfile (file, search_section, search_name, to_table, filter) for line in string.gmatch(file, "([^\n]*)\n") do conf_file[#conf_file + 1] = line end + local extra = string.match(file,"([^\n]*)$") + if extra ~= "" then + conf_file[#conf_file + 1] = extra + end end local section = "" local skip_lines = 0 |