diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-10 09:02:13 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-10 09:02:13 +0000 |
commit | b97f032464f654f9bd4c45a3b09a52e6a3693ca0 (patch) | |
tree | 367a1ee3ffdaac697d7625b53f8f7ee80de51b10 /apps | |
parent | d044f5575fa530023a991dd90ab8f270819e7b74 (diff) | |
download | rockbox-b97f032464f654f9bd4c45a3b09a52e6a3693ca0.tar.gz rockbox-b97f032464f654f9bd4c45a3b09a52e6a3693ca0.zip |
Added leading slash to the mp3 file name
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@927 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playlist.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) | |||
46 | fd = open(playlist.filename, O_RDONLY); | 46 | fd = open(playlist.filename, O_RDONLY); |
47 | if(-1 != fd) { | 47 | if(-1 != fd) { |
48 | lseek(fd, seek, SEEK_SET); | 48 | lseek(fd, seek, SEEK_SET); |
49 | max = read(fd, now_playing, sizeof(now_playing)); | 49 | max = read(fd, now_playing+1, sizeof(now_playing)-1); |
50 | close(fd); | 50 | close(fd); |
51 | |||
52 | /* Only absolute paths allowed */ | ||
53 | now_playing[0] = '/'; | ||
51 | 54 | ||
55 | /* Zero-terminate the file name */ | ||
52 | seek=0; | 56 | seek=0; |
53 | while((now_playing[seek] != '\n') && | 57 | while((now_playing[seek] != '\n') && |
54 | (now_playing[seek] != '\r') && | 58 | (now_playing[seek] != '\r') && |