aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-27 09:05:58 +0100
committerMax Kellermann <max@duempel.org>2009-02-27 09:05:58 +0100
commit53271e8ae7df7739e7696d9ade03c607548e775a (patch)
tree141a6f41edfc563465be7ac439f55d2d58660d34 /src/update.c
parent497c0b1c186f811f3a088230a2001d04cebd57ef (diff)
downloadmpd-53271e8ae7df7739e7696d9ade03c607548e775a.tar.gz
mpd-53271e8ae7df7739e7696d9ade03c607548e775a.tar.xz
mpd-53271e8ae7df7739e7696d9ade03c607548e775a.zip
update: print error when opendir() fails
MPD used to be silent when it could stat() a directory, but could not opendir() it to read its contents. This caused a lot of support headache with users who have wrong file permissions. Add another warning message.
Diffstat (limited to '')
-rw-r--r--src/update.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/update.c b/src/update.c
index 66a41e49b..d615687f6 100644
--- a/src/update.c
+++ b/src/update.c
@@ -540,9 +540,14 @@ updateDirectory(struct directory *directory, const struct stat *st)
return false;
dir = opendir(path_fs);
- g_free(path_fs);
- if (!dir)
+ if (!dir) {
+ g_warning("Failed to open directory %s: %s",
+ path_fs, g_strerror(errno));
+ g_free(path_fs);
return false;
+ }
+
+ g_free(path_fs);
removeDeletedFromDirectory(directory);