Sync OpenBSD patchset 635:

Instead of bailing out on the first configuration file error, carry on,
collecting all the errors, then start with the active window in more mode
displaying them.
This commit is contained in:
Tiago Cunha
2010-02-08 18:10:07 +00:00
parent 676d0809d2
commit a32d095c97
8 changed files with 120 additions and 70 deletions

9
tmux.c
View File

@@ -1,4 +1,4 @@
/* $Id: tmux.c,v 1.199 2010-02-05 01:32:10 tcunha Exp $ */
/* $Id: tmux.c,v 1.200 2010-02-08 18:10:07 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -435,15 +435,10 @@ main(int argc, char **argv)
home = pw->pw_dir;
}
xasprintf(&cfg_file, "%s/%s", home, DEFAULT_CFG);
if (access(cfg_file, R_OK) != 0) {
if (access(cfg_file, R_OK) != 0 && errno == ENOENT) {
xfree(cfg_file);
cfg_file = NULL;
}
} else {
if (access(cfg_file, R_OK) != 0) {
log_warn("%s", cfg_file);
exit(1);
}
}
/*