Skip to content
Snippets Groups Projects
Commit 94ebca75 authored by rswindell's avatar rswindell
Browse files

Changes current directory before loading config files and starting server

threads (solves problem loading relative paths when bbs_thread() hasn't
started).
parent a0ecb421
No related branches found
No related tags found
No related merge requests found
......@@ -1433,6 +1433,10 @@ int main(int argc, char** argv)
/* Read in configuration files */
memset(&scfg,0,sizeof(scfg));
SAFECOPY(scfg.ctrl_dir,bbs_startup.ctrl_dir);
if(chdir(scfg.ctrl_dir)!=0)
fprintf(stderr,"\n!ERROR %d changing directory to: %s\n", errno, scfg.ctrl_dir);
scfg.size=sizeof(scfg);
SAFECOPY(error,UNKNOWN_LOAD_ERROR);
sprintf(str,"Loading configuration files from %s", scfg.ctrl_dir);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment