Don't try to mkdir(CONFDIR) if --config is used.

This commit is contained in:
Guus Sliepen 2013-09-08 15:03:06 +02:00
parent c25c684a84
commit e11daa2646
4 changed files with 5 additions and 2 deletions

View file

@ -823,7 +823,7 @@ int cmd_join(int argc, char *argv[]) {
}
// Make sure confbase exists and is accessible.
if(strcmp(confdir, confbase) && mkdir(confdir, 0755) && errno != EEXIST) {
if(!confbase_given && mkdir(confdir, 0755) && errno != EEXIST) {
fprintf(stderr, "Could not create directory %s: %s\n", confdir, strerror(errno));
return 1;
}