diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-07-20 17:43:01 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-07-20 17:43:01 +0000 |
commit | 8347e808381dd653ee8ce02a871becde50495104 (patch) | |
tree | 583d5b78a1b0f62122e5cd08c5f8476d22394d60 | |
parent | 8205e1bbc73ef201556e01292c3dcdac85cb7a13 (diff) |
print strerror() when having problems stat'ing
git-svn-id: https://svn.musicpd.org/mpd/trunk@1887 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r-- | src/path.c | 5 |
1 files 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 <sys/types.h> #include <sys/stat.h> #include <unistd.h> +#include <errno.h> #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); } |