aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-07-20 17:43:01 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-07-20 17:43:01 +0000
commit8347e808381dd653ee8ce02a871becde50495104 (patch)
tree583d5b78a1b0f62122e5cd08c5f8476d22394d60
parent8205e1bbc73ef201556e01292c3dcdac85cb7a13 (diff)
downloadmpd-8347e808381dd653ee8ce02a871becde50495104.tar.gz
mpd-8347e808381dd653ee8ce02a871becde50495104.tar.xz
mpd-8347e808381dd653ee8ce02a871becde50495104.zip
print strerror() when having problems stat'ing
git-svn-id: https://svn.musicpd.org/mpd/trunk@1887 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/path.c5
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);
}