aboutsummaryrefslogtreecommitdiffstats
path: root/src/mapper.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-11-28 09:44:36 +0100
committerMax Kellermann <max@duempel.org>2011-11-28 09:51:21 +0100
commit718e180423aeb84fc513858415a201905630580c (patch)
tree2dc81c2e2f0deab7fc221dfafe75ec19583f7bc8 /src/mapper.c
parentcead5e5bd75ed2d71f3834adcb02e3d99082df7f (diff)
downloadmpd-718e180423aeb84fc513858415a201905630580c.tar.gz
mpd-718e180423aeb84fc513858415a201905630580c.tar.xz
mpd-718e180423aeb84fc513858415a201905630580c.zip
mapper: check "x" permission on music directory
This is a common support case, and hopefully, the new error message will allow the user to understand the error without requiring support.
Diffstat (limited to 'src/mapper.c')
-rw-r--r--src/mapper.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mapper.c b/src/mapper.c
index 30d932f95..41ed6550b 100644
--- a/src/mapper.c
+++ b/src/mapper.c
@@ -68,6 +68,14 @@ check_directory(const char *path)
g_warning("Not a directory: %s", path);
return;
}
+
+#ifndef WIN32
+ char *x = g_build_filename(path, ".", NULL);
+ if (stat(x, &st) < 0 && errno == EACCES)
+ g_warning("No permission to traverse (\"execute\") directory: %s",
+ path);
+ g_free(x);
+#endif
}
static void