Browse Source

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
```
ppa-0.6.1
practicalswift 7 years ago
committed by Christian Decker
parent
commit
2f179fb6cb
  1. 5
      lightningd/options.c

5
lightningd/options.c

@ -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));

Loading…
Cancel
Save