1
0
Fork 0
forked from len0rd/rockbox

Added leading slash to the mp3 file name

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@927 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2002-06-10 09:02:13 +00:00
parent d044f5575f
commit b97f032464

View file

@ -46,9 +46,13 @@ char* playlist_next(int type)
fd = open(playlist.filename, O_RDONLY); fd = open(playlist.filename, O_RDONLY);
if(-1 != fd) { if(-1 != fd) {
lseek(fd, seek, SEEK_SET); 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); close(fd);
/* Only absolute paths allowed */
now_playing[0] = '/';
/* Zero-terminate the file name */
seek=0; seek=0;
while((now_playing[seek] != '\n') && while((now_playing[seek] != '\n') &&
(now_playing[seek] != '\r') && (now_playing[seek] != '\r') &&