From 8347e808381dd653ee8ce02a871becde50495104 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Tue, 20 Jul 2004 17:43:01 +0000 Subject: print strerror() when having problems stat'ing git-svn-id: https://svn.musicpd.org/mpd/trunk@1887 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/path.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/path.c b/src/path.c index 4ca9fa658..48d5eff09 100644 --- a/src/path.c +++ b/src/path.c @@ -27,6 +27,7 @@ #include #include #include +#include #ifdef HAVE_LOCALE #ifdef HAVE_LANGINFO_CODESET @@ -116,11 +117,11 @@ void initPaths(char * playlistDirArg, char * musicDirArg) { playlistDir = prependCwdToPathDup(playlistDirArg); if((stat(playlistDir,&st))<0) { - ERROR("problem stat'ing \"%s\"\n",playlistDirArg); + ERROR("problem stat'ing \"%s\": %s\n", playlistDirArg, strerror(errno)); exit(EXIT_FAILURE); } if(!S_ISDIR(st.st_mode)) { - ERROR("\"%s\" is not a directory\n",playlistDirArg); + ERROR("\"%s\" is not a directory: %s\n", playlistDirArg, strerror(errno)); exit(EXIT_FAILURE); } -- cgit v1.2.3