mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-27 15:56:18 -04:00
Playlist Fix failure to append default file name
FS#12992 - Can't create playlist with all tracks on device (regression) references this issue empty_playlist() only sets filename[0] = '\0' the code was checking filename[1].. bug ensued strip extra leading '/' from default path Change-Id: Ibd8973666ee45583b9e11e3ba317c0e247f085c1
This commit is contained in:
parent
0ff6a31d7d
commit
fd19a2caa2
2 changed files with 5 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ int save_playlist_screen(struct playlist_info* playlist)
|
||||||
if (!dot)
|
if (!dot)
|
||||||
{
|
{
|
||||||
/* folder of some type */
|
/* folder of some type */
|
||||||
if (temp[1] != '\0')
|
if (len > 1)
|
||||||
strcpy(&temp[len-1], ".m3u8");
|
strcpy(&temp[len-1], ".m3u8");
|
||||||
else
|
else
|
||||||
snprintf(temp, sizeof(temp), "%s%s",
|
snprintf(temp, sizeof(temp), "%s%s",
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,10 @@ static int initialize_catalog(void)
|
||||||
mkdir(playlist_dir);
|
mkdir(playlist_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* remove duplicate leading '/' */
|
||||||
|
if (playlist_dir[0] == '/' && playlist_dir[1] == '/')
|
||||||
|
strcpy(playlist_dir, &playlist_dir[1]);
|
||||||
|
|
||||||
playlist_dir_length = strlen(playlist_dir);
|
playlist_dir_length = strlen(playlist_dir);
|
||||||
|
|
||||||
if (dir_exists(playlist_dir))
|
if (dir_exists(playlist_dir))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue