aboutsummaryrefslogtreecommitdiffstats
path: root/src/ls.c
diff options
context:
space:
mode:
authorQball Cow <qball@qballcow.nl>2007-08-20 14:34:16 +0000
committerQball Cow <qball@qballcow.nl>2007-08-20 14:34:16 +0000
commit30ceda2640277ee8c6f7f96e4fa86545932f1c9c (patch)
tree8bc64082843944cf3bc6a271ea72d835745a7062 /src/ls.c
parent5f4878cddbd8b03d4fcef7fe9e37482729ec858d (diff)
downloadmpd-30ceda2640277ee8c6f7f96e4fa86545932f1c9c.tar.gz
mpd-30ceda2640277ee8c6f7f96e4fa86545932f1c9c.tar.xz
mpd-30ceda2640277ee8c6f7f96e4fa86545932f1c9c.zip
just testing3
git-svn-id: https://svn.musicpd.org/mpd/branches/q-mpd@6775 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/ls.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/ls.c b/src/ls.c
index 2e17654b5..6f0b29a4e 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -167,17 +167,10 @@ int lsPlaylists(int fd, char *utf8path)
node = list->firstNode;
while (node != NULL) {
if (!strchr(node->key, '\n')) {
- s[MAXPATHLEN] = '\0';
- /* this is safe, notice actlen > MAXPATHLEN-1 above */
- strcpy(s, actualPath);
- strcat(s, "/");
- strcat(s, node->key);
- strcat(s,".");
- strcat(s, PLAYLIST_FILE_SUFFIX);
+ char *filename = utf8pathToFsPathInStoredPlaylist(utf8path, fd);
fdprintf(fd, "playlist: %s%s\n", dup, node->key);
- fdprintf(fd, "full path: %s\n", s);
- if(myStat(s, &data))
+ if(myStat(filename, &data) == 0)
{
fdprintf(fd, "mtime: %li\n", data.st_mtime);
}