aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-09-20 03:39:43 -0700
committerEric Wong <normalperson@yhbt.net>2008-09-20 03:39:43 -0700
commitdf1ed6f83043b7290d27b49c3c63fc8bcb796d5c (patch)
tree70a6ef6e795be45dedd863ce63983d22910ef706 /src/directory.c
parent1087b54a46feacb5a6a46d99df77345be8d4d54d (diff)
downloadmpd-df1ed6f83043b7290d27b49c3c63fc8bcb796d5c.tar.gz
mpd-df1ed6f83043b7290d27b49c3c63fc8bcb796d5c.tar.xz
mpd-df1ed6f83043b7290d27b49c3c63fc8bcb796d5c.zip
Oops, open() with O_CREAT is nicer with a mode
Respect the user's umask (and the number of the beast!)
Diffstat (limited to 'src/directory.c')
-rw-r--r--src/directory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/directory.c b/src/directory.c
index 06a39d7bf..c07f9edcb 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -1042,7 +1042,7 @@ int writeDirectoryDB(void)
DEBUG("writing DB\n");
- while (((fd = open(dbFile, O_WRONLY|O_TRUNC|O_CREAT)) < 0) &&
+ while (((fd = open(dbFile, O_WRONLY|O_TRUNC|O_CREAT, 0666)) < 0) &&
errno == EINTR);
if (fd < 0) {
ERROR("unable to write to db file \"%s\": %s\n",