forked from len0rd/rockbox
Improved responsiveness for dirplay, plus fixed a bug that could cause a file handle leak, and sometimes playlist loading problems
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3518 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e67ec3454e
commit
570f16fd6d
1 changed files with 11 additions and 8 deletions
|
|
@ -490,18 +490,21 @@ char* playlist_peek(int steps)
|
||||||
|
|
||||||
/* remove bogus dirs from beginning of path
|
/* remove bogus dirs from beginning of path
|
||||||
(workaround for buggy playlist creation tools) */
|
(workaround for buggy playlist creation tools) */
|
||||||
while (buf)
|
if(!playlist.in_ram)
|
||||||
{
|
{
|
||||||
fd = open(buf, O_RDONLY);
|
while (buf)
|
||||||
if (fd > 0)
|
|
||||||
{
|
{
|
||||||
close(fd);
|
fd = open(buf, O_RDONLY);
|
||||||
break;
|
if (fd >= 0)
|
||||||
|
{
|
||||||
|
close(fd);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
buf = strchr(buf+1, '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = strchr(buf+1, '/');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!buf)
|
if (!buf)
|
||||||
{
|
{
|
||||||
/* Even though this is an invalid file, we still need to pass a file
|
/* Even though this is an invalid file, we still need to pass a file
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue