diff options
author | Qball Cow <qball@qballcow.nl> | 2007-08-20 14:40:27 +0000 |
---|---|---|
committer | Qball Cow <qball@qballcow.nl> | 2007-08-20 14:40:27 +0000 |
commit | cfa55bc43dd805a3157a96550e8f15da16c3587a (patch) | |
tree | e4a2e7ff79a606527af9c49db73e91a499ab5db4 | |
parent | 30ceda2640277ee8c6f7f96e4fa86545932f1c9c (diff) | |
download | mpd-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
Diffstat (limited to '')
-rw-r--r-- | src/ls.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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; |