From: Dana Jansens Date: Sat, 25 Oct 2003 19:16:57 +0000 (+0000) Subject: show a message if chdir() fails X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=4cb183401cc42f61a759b02f1210a3528f7869e5;p=chaz%2Fopenbox show a message if chdir() fails --- 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 #endif +#include #include @@ -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();