https://gitlab.synchro.net/main/sbbs/-/commit/c78181f472342b6a696c895a
Modified Files:
src/sbbs3/js_file.cpp jsexec.cpp load_cfg.c rechocfg.c sbbs_ini.c sbbsecho.c services.cpp str.cpp websrvr.cpp src/xpdev/ini_file.c ini_file.h
Log Message:
iniReadFile() no longer reads !include'd files, use iniReadFiles() if needed
Most .ini files don't need/use !include'd files and if you end up calling iniWriteFile() to write the results back to disk (with or without changes),
it comments out the !include directives and pulls the contents of the !include'd files into the written file thus totally nullifying the reason to use !include in the first place.
This was most evident when running update.js which invokes other scripted installers (e.g. avatars.js install) which read and modify the modopts.ini
(if necessary). The default/stock comes with the line: !include modopts.d/*.ini
This gets totally replaced if avatars support is installed (for example) and evidenced by modopts.ini contents like this:
; !include modopts.d/*.ini - 2 matches found
; modopts.d/xtrnmenu.ini
<contents of xtrnmenu.ini>
; modopts.d/emailfiles.ini
; Options for "E-mail files as attachments" module
<contents of emailfiles.ini>
So... for code that calls iniWriteFile() (re-writes all lines in the .ini
file with in-memory string list), continue to use iniReadFile(), but lose the !include feature. For code that does not call iniWriteFile(), use iniReadFiles() (plural) instead, and pass `true` for the `includes` parameter.
This fixes issue #1088
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)