playlist: Unconditionally strip bogus dirs in playlist_peek()
The intent behind the check is to only do this if the filename comes from an on-disk file. With the RAM buffer is gone this is now "always" the case. Change-Id: I4c26e32c482dde176b69a6071e9562e9955d7171
This commit is contained in:
parent
aab6a44fc5
commit
a4cfa8ae6a
1 changed files with 13 additions and 16 deletions
|
@ -3149,25 +3149,22 @@ const char* playlist_peek(int steps, char* buf, size_t buf_size)
|
|||
|
||||
temp_ptr = buf;
|
||||
|
||||
if (!playlist->dirplay || control_file)
|
||||
/* remove bogus dirs from beginning of path
|
||||
(workaround for buggy playlist creation tools) */
|
||||
while (temp_ptr)
|
||||
{
|
||||
/* remove bogus dirs from beginning of path
|
||||
(workaround for buggy playlist creation tools) */
|
||||
while (temp_ptr)
|
||||
{
|
||||
if (file_exists(temp_ptr))
|
||||
break;
|
||||
if (file_exists(temp_ptr))
|
||||
break;
|
||||
|
||||
temp_ptr = strchr(temp_ptr+1, '/');
|
||||
}
|
||||
temp_ptr = strchr(temp_ptr+1, '/');
|
||||
}
|
||||
|
||||
if (!temp_ptr)
|
||||
{
|
||||
/* Even though this is an invalid file, we still need to pass a
|
||||
file name to the caller because NULL is used to indicate end
|
||||
of playlist */
|
||||
return buf;
|
||||
}
|
||||
if (!temp_ptr)
|
||||
{
|
||||
/* Even though this is an invalid file, we still need to pass a
|
||||
file name to the caller because NULL is used to indicate end
|
||||
of playlist */
|
||||
return buf;
|
||||
}
|
||||
|
||||
return temp_ptr;
|
||||
|
|
Loading…
Reference in a new issue