From e4dab2455b5e1568ebf9fafccceeb113654a3092 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Thu, 10 Sep 2015 11:57:31 -0700 Subject: [PATCH] scanner: Add more vebose scan error message. Print the errno in addition to the generic error message. --- scanner.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scanner.c b/scanner.c index ee3af48..33b961a 100644 --- a/scanner.c +++ b/scanner.c @@ -749,11 +749,13 @@ ScanDirectory(const char *dir, const char *parent, media_types dir_types) break; default: n = -1; + errno = EINVAL; break; } if( n < 0 ) { - DPRINTF(E_WARN, L_SCANNER, "Error scanning %s\n", dir); + DPRINTF(E_WARN, L_SCANNER, "Error scanning %s [%s]\n", + dir, strerror(errno)); return; }