forked from len0rd/rockbox
playback.c use file_exists rather than open to check for bad files
the worst case is really slow for open Change-Id: Ifcfe366ad9bee7ff43a0572e52f15b5c6f608288
This commit is contained in:
parent
603412f447
commit
359c66982f
1 changed files with 7 additions and 5 deletions
|
@ -1907,11 +1907,13 @@ static int audio_load_track(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Test for broken playlists by probing for the files */
|
/* Test for broken playlists by probing for the files */
|
||||||
fd = open(path, O_RDONLY);
|
if (file_exists(path))
|
||||||
if (fd >= 0)
|
{
|
||||||
break;
|
fd = open(path, O_RDONLY);
|
||||||
|
if (fd >= 0)
|
||||||
logf("Open failed");
|
break;
|
||||||
|
}
|
||||||
|
logf("Open failed %s", path);
|
||||||
|
|
||||||
/* only skip if failed track has a successor in playlist */
|
/* only skip if failed track has a successor in playlist */
|
||||||
if (!playlist_peek(playlist_peek_offset + 1, NULL, 0))
|
if (!playlist_peek(playlist_peek_offset + 1, NULL, 0))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue