database: require X_OK on parent directory, not R_OK

For accessing the child of a directory, one needs X_OK on the
directory.
This commit is contained in:
Max Kellermann 2011-07-08 21:20:38 +02:00
parent 73f9e17951
commit 762712c756

View File

@ -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);