summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-22 03:40:09 +0000
committerDana Jansens <danakj@orodu.net>2003-03-22 03:40:09 +0000
commit78aa056eeb1dc2900cc18b8f8c6baabf453fd370 (patch)
tree3dbcd1f45dde36406b4211d60da1cabab3be4df0 /openbox
parentdd6e27f2c3cf1754a6f02df059928186e9ddd868 (diff)
make the ~/.openbox dir on startup
Diffstat (limited to 'openbox')
-rw-r--r--openbox/openbox.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/openbox/openbox.c b/openbox/openbox.c
index 04e07ab6..edabe350 100644
--- a/openbox/openbox.c
+++ b/openbox/openbox.c
@@ -35,6 +35,10 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+# include <sys/types.h>
+#endif
#include <X11/cursorfont.h>
@@ -57,6 +61,7 @@ int main(int argc, char **argv)
{
struct sigaction action;
sigset_t sigset;
+ char *path;
ob_state = State_Starting;
@@ -87,6 +92,12 @@ int main(int argc, char **argv)
/* anything that died while we were restarting won't give us a SIGCHLD */
while (waitpid(-1, NULL, WNOHANG) > 0);
+
+ /* create the ~/.openbox dir */
+ path = g_build_filename(g_get_home_dir(), ".openbox", NULL);
+ mkdir(path, (S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP |
+ S_IROTH | S_IWOTH | S_IXOTH));
+ g_free(path);
/* parse out command line args */
parse_args(argc, argv);