diff options
author | Qball Cow <qball@qballcow.nl> | 2007-08-20 14:24:13 +0000 |
---|---|---|
committer | Qball Cow <qball@qballcow.nl> | 2007-08-20 14:24:13 +0000 |
commit | c09511f03de8c3c49b94a684ab70ec215f8208cb (patch) | |
tree | 49207209cf72090ee11ce0b655a18e35a3cd5dca /src | |
parent | b343793b10250ecb290d0d34722770b6506ff679 (diff) | |
download | mpd-c09511f03de8c3c49b94a684ab70ec215f8208cb.tar.gz mpd-c09511f03de8c3c49b94a684ab70ec215f8208cb.tar.xz mpd-c09511f03de8c3c49b94a684ab70ec215f8208cb.zip |
just testing
git-svn-id: https://svn.musicpd.org/mpd/branches/q-mpd@6770 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r-- | src/ls.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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; } |