aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQball Cow <qball@qballcow.nl>2007-08-20 14:40:27 +0000
committerQball Cow <qball@qballcow.nl>2007-08-20 14:40:27 +0000
commitcfa55bc43dd805a3157a96550e8f15da16c3587a (patch)
treee4a2e7ff79a606527af9c49db73e91a499ab5db4
parent30ceda2640277ee8c6f7f96e4fa86545932f1c9c (diff)
downloadmpd-cfa55bc43dd805a3157a96550e8f15da16c3587a.tar.gz
mpd-cfa55bc43dd805a3157a96550e8f15da16c3587a.tar.xz
mpd-cfa55bc43dd805a3157a96550e8f15da16c3587a.zip
ok, this time correct
git-svn-id: https://svn.musicpd.org/mpd/branches/q-mpd@6776 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--src/ls.c9
1 files 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;