Skip to content
Snippets Groups Projects
Commit d4744100 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Use iniGetSectionList() instead of iniReadSectionList()

... in File.iniGetSections() method

because iniReadSectionList() doesn't recognize !include directives.

This fixes issue #871 whereby modopts.js couldn't find sections in
modopts.d/*.ini files.
parent fdc8171f
Branches
Tags
No related merge requests found
Pipeline #8221 passed
......@@ -1202,7 +1202,9 @@ js_iniGetSections(JSContext *cx, uintN argc, jsval *arglist)
array = JS_NewArrayObject(cx, 0, NULL);
rc = JS_SUSPENDREQUEST(cx);
list = iniReadSectionList(p->fp, prefix);
str_list_t ini = iniReadFile(p->fp);
list = iniGetSectionList(ini, prefix);
strListFree(&ini);
FREE_AND_NULL(prefix);
JS_RESUMEREQUEST(cx, rc);
for (i = 0; list && list[i]; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment