Redo: Canonicalize conf in parse_cmdline

This commit is contained in:
wbaumann 2012-01-31 20:38:57 +00:00
parent 21414ee396
commit 014dd388cc

View File

@ -964,12 +964,6 @@ parse_commandline(dav_args *args, int argc, char *argv[])
if (!args->port)
args->port = ne_uri_defaultport(args->scheme);

if (args->conf) {
expand_home(&args->conf, args);
} else if (!args->privileged) {
args->conf = xasprintf("%s/.%s/%s", args->home, PACKAGE, DAV_CONFIG);
}

return args;
}

@ -994,6 +988,12 @@ parse_config(dav_args *args)
{
read_config(args, DAV_SYS_CONF_DIR "/" DAV_CONFIG, 1);

if (args->conf) {
expand_home(&args->conf, args);
} else if (!args->privileged) {
args->conf = xasprintf("%s/.%s/%s", args->home, PACKAGE, DAV_CONFIG);
}

if (args->conf)
read_config(args, args->conf, 0);