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.
This commit is contained in:
Max Kellermann 2009-02-27 09:05:58 +01:00
parent 497c0b1c18
commit 53271e8ae7

View File

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