summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-06-10 09:02:13 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-06-10 09:02:13 +0000
commitb97f032464f654f9bd4c45a3b09a52e6a3693ca0 (patch)
tree367a1ee3ffdaac697d7625b53f8f7ee80de51b10
parentd044f5575fa530023a991dd90ab8f270819e7b74 (diff)
downloadrockbox-b97f032464f654f9bd4c45a3b09a52e6a3693ca0.zip
rockbox-b97f032464f654f9bd4c45a3b09a52e6a3693ca0.tar.gz
rockbox-b97f032464f654f9bd4c45a3b09a52e6a3693ca0.tar.bz2
rockbox-b97f032464f654f9bd4c45a3b09a52e6a3693ca0.tar.xz
Added leading slash to the mp3 file name
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@927 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/playlist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 9ac05b5..65ab494 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') &&