aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;