From b97f032464f654f9bd4c45a3b09a52e6a3693ca0 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Mon, 10 Jun 2002 09:02:13 +0000 Subject: Added leading slash to the mp3 file name git-svn-id: svn://svn.rockbox.org/rockbox/trunk@927 a1c6a512-1295-4272-9138-f99709370657 --- apps/playlist.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/playlist.c b/apps/playlist.c index 9ac05b5fe2..65ab494d18 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -46,9 +46,13 @@ char* playlist_next(int type) fd = open(playlist.filename, O_RDONLY); if(-1 != fd) { lseek(fd, seek, SEEK_SET); - max = read(fd, now_playing, sizeof(now_playing)); + max = read(fd, now_playing+1, sizeof(now_playing)-1); close(fd); + + /* Only absolute paths allowed */ + now_playing[0] = '/'; + /* Zero-terminate the file name */ seek=0; while((now_playing[seek] != '\n') && (now_playing[seek] != '\r') && -- cgit v1.2.3