From cfa55bc43dd805a3157a96550e8f15da16c3587a Mon Sep 17 00:00:00 2001 From: Qball Cow Date: Mon, 20 Aug 2007 14:40:27 +0000 Subject: ok, this time correct git-svn-id: https://svn.musicpd.org/mpd/branches/q-mpd@6776 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/ls.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ls.c b/src/ls.c index 6f0b29a4e..2bcc41491 100644 --- a/src/ls.c +++ b/src/ls.c @@ -167,12 +167,13 @@ int lsPlaylists(int fd, char *utf8path) node = list->firstNode; while (node != NULL) { if (!strchr(node->key, '\n')) { - char *filename = utf8pathToFsPathInStoredPlaylist(utf8path, fd); + char *filename = utf8pathToFsPathInStoredPlaylist(node->key, fd); fdprintf(fd, "playlist: %s%s\n", dup, node->key); - if(myStat(filename, &data) == 0) - { - fdprintf(fd, "mtime: %li\n", data.st_mtime); + if(filename) { + if(myStat(filename, &data) == 0) { + fdprintf(fd, "mtime: %li\n", data.st_mtime); + } } } node = node->nextNode; -- cgit v1.2.3