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

Pass the ctrl directory on the SCFG command-line

Fixes issue were jsexec was used to invoke this script and a ctrl dir
(different than the contents of the SBBSCTRL env var) was passed on the
command-line (i.e. testing purpose). Use the correct ctrl directory.

Create the data/text directory if it doesn't already exist. This dir
is normally created whenever SBBS is run, so it should normally already
exist, but if someone runs this script via jsexec before (ever) running
sbbs, then it's possible the data/text directory does not yet exist.
parent 9e89361b
Branches
Tags
No related merge requests found
Pipeline #6905 passed
...@@ -759,7 +759,8 @@ if(echolist_fname && file_size(echolist_fname) > 0) { ...@@ -759,7 +759,8 @@ if(echolist_fname && file_size(echolist_fname) > 0) {
var misc = 0; var misc = 0;
if(!network.handles) if(!network.handles)
misc |= SUB_NAME; misc |= SUB_NAME;
system.exec(system.exec_dir + "scfg" system.exec(system.exec_dir + "scfg "
+ system.ctrl_dir
+ " -import=" + echolist_fname + " -import=" + echolist_fname
+ " -g" + netname + " -g" + netname
+ " -faddr=" + fidoaddr.to_str(your) + " -faddr=" + fidoaddr.to_str(your)
...@@ -863,6 +864,7 @@ function add_gfile(fname, desc, tail) ...@@ -863,6 +864,7 @@ function add_gfile(fname, desc, tail)
file.close(); file.close();
return true; return true;
} }
mkdir(system.data_dir + "text");
var file = new File(system.data_dir + "text/operator.ini"); var file = new File(system.data_dir + "text/operator.ini");
if(!file.open(file.exists ? 'r+':'w+')) { if(!file.open(file.exists ? 'r+':'w+')) {
alert("Error " + file.error + " opening " + file.name); alert("Error " + file.error + " opening " + file.name);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment