Unverified Commit 89152f8e authored by Binbin's avatar Binbin Committed by GitHub
Browse files

Use loaderr label to handle error. (#9111)

So that we can easily see the lines of the config.
Also unified with other error handling.
parent 6248127c
......@@ -487,9 +487,9 @@ void loadServerConfigFromString(char *config) {
}
} else if (!strcasecmp(argv[0],"dir") && argc == 2) {
if (chdir(argv[1]) == -1) {
serverLog(LL_WARNING,"Can't chdir to '%s': %s",
err = sdscatprintf(sdsempty(), "Can't chdir to '%s': %s",
argv[1], strerror(errno));
exit(1);
goto loaderr;
}
} else if (!strcasecmp(argv[0],"logfile") && argc == 2) {
FILE *logfp;
......
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