diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-10-25 19:16:57 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-10-25 19:16:57 +0000 |
| commit | 4cb183401cc42f61a759b02f1210a3528f7869e5 (patch) | |
| tree | 15bddee80ac9abc8ab8a8abc34bbbdaec61cf21d | |
| parent | eaa3b3aaa72c5828902639dfa215f6c3b6c2a282 (diff) | |
show a message if chdir() fails
| -rw-r--r-- | openbox/openbox.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openbox/openbox.c b/openbox/openbox.c index ef23eafe..b6882965 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -62,6 +62,7 @@ #ifdef HAVE_UNISTD_H # include <unistd.h> #endif +#include <errno.h> #include <X11/cursorfont.h> @@ -101,7 +102,9 @@ gint main(gint argc, gchar **argv) g_set_prgname(argv[0]); - chdir(g_get_home_dir()); + if (chdir(g_get_home_dir()) == -1) + g_warning("Unable to change to home directory (%s): %s", + g_get_home_dir(), g_strerror(errno)); parse_paths_startup(); |
