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

Backup the sbbs.ini file when saving changes to it in SCFG

parent 76b20f2d
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4034 failed
......@@ -27,6 +27,7 @@
#include "sbbs_ini.h"
#include "dirwrap.h" /* backslash */
#include "sbbsdefs.h" /* JAVASCRIPT_* macros */
#include "nopen.h" /* backup */
static const char* nulstr="";
static const char* strAutoStart="AutoStart";
......@@ -794,6 +795,7 @@ void sbbs_read_ini(
BOOL sbbs_write_ini(
FILE* fp
,scfg_t* cfg
,int backup_level
,global_startup_t* global
,BOOL run_bbs
,bbs_startup_t* bbs
......@@ -1356,6 +1358,7 @@ BOOL sbbs_write_ini(
}
/***********************************************************************/
backup(cfg->filename, backup_level, /* rename: */FALSE);
result=iniWriteFile(fp,list);
} while(0); /* finally */
......
......@@ -82,6 +82,7 @@ BOOL sbbs_set_js_settings(
BOOL sbbs_write_ini(
FILE* fp
,scfg_t* cfg
,int backup_level
,global_startup_t* global
,BOOL run_bbs
,bbs_startup_t* bbs
......
......@@ -2498,6 +2498,7 @@ void bail(int code)
if(!sbbs_write_ini(
fp
,&cfg
,backup_level
,&global_startup
,run_bbs
,&bbs_startup
......
......@@ -278,6 +278,7 @@ static void global_cfg(void)
if(!sbbs_write_ini(
fp
,&cfg
,backup_level
,&startup
,false
,NULL
......@@ -527,6 +528,7 @@ static void termsrvr_cfg(void)
if(!sbbs_write_ini(
fp
,&cfg
,backup_level
,NULL
,enabled
,&startup
......@@ -790,6 +792,7 @@ static void websrvr_cfg(void)
if(!sbbs_write_ini(
fp
,&cfg
,backup_level
,NULL
,FALSE
,NULL
......@@ -986,6 +989,7 @@ static void ftpsrvr_cfg(void)
if(!sbbs_write_ini(
fp
,&cfg
,backup_level
,NULL
,FALSE
,NULL
......@@ -1398,6 +1402,7 @@ static void mailsrvr_cfg(void)
if(!sbbs_write_ini(
fp
,&cfg
,backup_level
,NULL
,FALSE
,NULL
......@@ -1513,6 +1518,7 @@ static void services_cfg(void)
if(!sbbs_write_ini(
fp
,&cfg
,backup_level
,NULL
,FALSE
,NULL
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment