#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
+#include <errno.h>
#include <X11/cursorfont.h>
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();
} else {
g_warning("failed to execute '%s': %s", restart_path,
err->message);
+ g_error_free(err);
}
}