From c09511f03de8c3c49b94a684ab70ec215f8208cb Mon Sep 17 00:00:00 2001 From: Qball Cow Date: Mon, 20 Aug 2007 14:24:13 +0000 Subject: just testing git-svn-id: https://svn.musicpd.org/mpd/branches/q-mpd@6770 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/ls.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ls.c b/src/ls.c index e62ed046b..a01dd0872 100644 --- a/src/ls.c +++ b/src/ls.c @@ -167,9 +167,17 @@ int lsPlaylists(int fd, char *utf8path) node = list->firstNode; while (node != NULL) { if (!strchr(node->key, '\n')) { - myStat(node->key, &data); + s[MAXPATHLEN] = '\0'; + /* this is safe, notice actlen > MAXPATHLEN-1 above */ + strcpy(s, actualPath); + strcat(s, "/"); + strcat(s, node->key); + fdprintf(fd, "playlist: %s%s\n", dup, node->key); - fdprintf(fd, "mtime: %li\n", data.st_mtime); + if(myStat(s, &data)) + { + fdprintf(fd, "mtime: %li\n", data.st_mtime); + } } node = node->nextNode; } -- cgit v1.2.3