Commit 53271e8a authored by Max Kellermann's avatar Max Kellermann

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.
parent 497c0b1c
......@@ -540,9 +540,14 @@ updateDirectory(struct directory *directory, const struct stat *st)
return false;
dir = opendir(path_fs);
if (!dir) {
g_warning("Failed to open directory %s: %s",
path_fs, g_strerror(errno));
g_free(path_fs);
if (!dir)
return false;
}
g_free(path_fs);
removeDeletedFromDirectory(directory);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment