Skip to content
Snippets Groups Projects
Commit e3e2ea5a authored by Ondřej Filip's avatar Ondřej Filip
Browse files

Implemented config file real path resolution even more properly. :-)

refs 2bfe863d
parent 2bfe863d
No related branches found
No related tags found
No related merge requests found
......@@ -166,13 +166,7 @@ int main(int argc, char **argv)
if (config_fn[0] != '/')
{
// Get absolute path to cwd
char *rpath = malloc(PATH_MAX);
if (rpath != NULL) {
if (realpath(config_fn, rpath) == NULL) {
free(rpath);
rpath = NULL;
}
}
char *rpath = realpath(config_fn, NULL);
if (rpath == NULL) {
log_server_error("Couldn't get current working directory - "
"%s.\n", strerror(errno));
......
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