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

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
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1124 passed
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment