]> Dogcows Code - chaz/openbox/commitdiff
show a message if chdir() fails
authorDana Jansens <danakj@orodu.net>
Sat, 25 Oct 2003 19:16:57 +0000 (19:16 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 25 Oct 2003 19:16:57 +0000 (19:16 +0000)
openbox/openbox.c

index ef23eafe9fa84ddb97b74631071d342f408da283..b688296516911f2afee8254577a00635c3d60d4c 100644 (file)
@@ -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();
 
This page took 0.026412 seconds and 4 git commands to generate.