aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQball Cow <qball@qballcow.nl>2007-08-20 14:24:13 +0000
committerQball Cow <qball@qballcow.nl>2007-08-20 14:24:13 +0000
commitc09511f03de8c3c49b94a684ab70ec215f8208cb (patch)
tree49207209cf72090ee11ce0b655a18e35a3cd5dca /src
parentb343793b10250ecb290d0d34722770b6506ff679 (diff)
downloadmpd-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 '')
-rw-r--r--src/ls.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ls.c b/src/ls.c
index e62ed046b..a01dd0872 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -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;
}