aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-07-08 21:20:38 +0200
committerMax Kellermann <max@duempel.org>2011-07-18 22:48:07 +0200
commit762712c756fe3041cc60cc4084ef505e56acf57c (patch)
treeee88b565cd0080287cc909f877581bf04dd38916
parent73f9e1795156fc7fd5e41de45f3acce24c71d874 (diff)
downloadmpd-762712c756fe3041cc60cc4084ef505e56acf57c.tar.gz
mpd-762712c756fe3041cc60cc4084ef505e56acf57c.tar.xz
mpd-762712c756fe3041cc60cc4084ef505e56acf57c.zip
database: require X_OK on parent directory, not R_OK
For accessing the child of a directory, one needs X_OK on the directory.
-rw-r--r--src/database.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c
index f255d6ca5..9f29f95e1 100644
--- a/src/database.c
+++ b/src/database.c
@@ -180,7 +180,7 @@ db_check(void)
}
/* Check if we can write to the directory */
- if (access(dirPath, R_OK | W_OK)) {
+ if (access(dirPath, X_OK | W_OK)) {
g_warning("Can't create db file in \"%s\": %s",
dirPath, strerror(errno));
g_free(dirPath);