From 03018611f8b9d7ed6d55ee45ccf2b69958c05caf Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 31 Jan 2011 07:19:34 +0100 Subject: [PATCH] update: log all file permission problems --- NEWS | 1 + src/update.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 1a90124b5..313a5c621 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ver 0.15.16 (2010/??/??) * encoders: - lame: explicitly configure the output sample rate +* update: log all file permission problems ver 0.15.15 (2010/11/08) diff --git a/src/update.c b/src/update.c index d5c9779c8..9a1e7d29b 100644 --- a/src/update.c +++ b/src/update.c @@ -254,6 +254,9 @@ stat_directory(const struct directory *directory, struct stat *st) if (path_fs == NULL) return -1; ret = stat(path_fs, st); + if (ret < 0) + g_warning("Failed to stat %s: %s", path_fs, g_strerror(errno)); + g_free(path_fs); return ret; } @@ -270,6 +273,9 @@ stat_directory_child(const struct directory *parent, const char *name, return -1; ret = stat(path_fs, st); + if (ret < 0) + g_warning("Failed to stat %s: %s", path_fs, g_strerror(errno)); + g_free(path_fs); return ret; }