mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
Don't greet new users with an error message
Before this patch: ``` $ lightningd/lightningd lightningd(PID): Creating lightningd dir /root/.lightning (because chdir gave No such file or directory) lightningd(PID): Creating database ``` After this patch: ``` $ lightningd/lightningd lightningd(PID): Creating lightningd dir /root/.lightning lightningd(PID): Creating database ```
This commit is contained in:
committed by
Christian Decker
parent
e2d66136d3
commit
2f179fb6cb
@@ -612,9 +612,8 @@ bool handle_opts(struct lightningd *ld, int argc, char *argv[])
|
||||
|
||||
/* Move to config dir, to save ourselves the hassle of path manip. */
|
||||
if (chdir(ld->config_dir) != 0) {
|
||||
log_unusual(ld->log, "Creating lightningd dir %s"
|
||||
" (because chdir gave %s)",
|
||||
ld->config_dir, strerror(errno));
|
||||
log_unusual(ld->log, "Creating lightningd dir %s",
|
||||
ld->config_dir);
|
||||
if (mkdir(ld->config_dir, 0700) != 0)
|
||||
fatal("Could not make directory %s: %s",
|
||||
ld->config_dir, strerror(errno));
|
||||
|
||||
Reference in New Issue
Block a user