Commit b68df653 authored by Rob Swindell's avatar Rob Swindell

Make default node 2+ directory paths derived from node 1's directory

For deon's use with Docker:
When creating new nodes (after node 1), derive the new node directory from node 1's configured directory if possible (e.g. it has a '1' in it). So if Node 1's directory is /blah/bbsdir1, then node 2's directory will default to /blah/bbsdir2. When creating node 1 (the first node), it still defaults to "../node1".
parent 9e85be8f
Pipeline #1124 passed with stage
in 16 minutes and 22 seconds
......@@ -101,7 +101,16 @@ void node_menu()
SAFECOPY(cfg.node_dir,cfg.node_path[cfg.sys_nodes-1]);
i=cfg.sys_nodes+1;
load_node_cfg(&cfg,error);
sprintf(str,"../node%d/",i);
if(i == 1) {
SAFEPRINTF(str,"../node%d/",i);
} else {
char* p;
SAFECOPY(str, cfg.node_path[0]);
if((p = strchr(str, '1')) != NULL)
sprintf(p, "%d/", i);
else
SAFEPRINTF(str,"../node%d/",i);
}
sprintf(tmp,"Node %d Directory",i);
uifc.helpbuf=node_path_help;
j=uifc.input(WIN_MID,0,0,tmp,str,50,K_EDIT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment