mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
FS#12702: Fix illegal characters in suggested playlist filename
Issue had only been partially fixed in
3f3b738
by showing an error message
Change-Id: I91665ac826e0025fb80eadac31abffa03667cf62
This commit is contained in:
parent
24c9ccfac0
commit
2c4c1b9199
3 changed files with 4 additions and 2 deletions
|
@ -443,6 +443,7 @@ bool catalog_add_to_a_playlist(const char* sel, int sel_attr,
|
|||
{
|
||||
int result;
|
||||
char playlist[MAX_PATH + 7]; /* room for /.m3u8\0*/
|
||||
size_t basename_start;
|
||||
if ((browser_status & CATBROWSE_PLAYLIST) == CATBROWSE_PLAYLIST)
|
||||
return false;
|
||||
|
||||
|
@ -468,7 +469,10 @@ bool catalog_add_to_a_playlist(const char* sel, int sel_attr,
|
|||
".m3u8", 1 IF_CNFN_NUM_(, NULL));
|
||||
else
|
||||
{
|
||||
basename_start = strlen(playlist) + 1;
|
||||
strlcat(playlist, name, sizeof(playlist));
|
||||
fix_path_part(playlist, basename_start,
|
||||
sizeof(playlist) - 1 - basename_start) ;
|
||||
apply_playlist_extension(playlist, sizeof(playlist));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4256,7 +4256,6 @@ static int context_menu(void)
|
|||
/* add a leading slash so that catalog_add_to_a_playlist
|
||||
later prefills the name when creating a new playlist */
|
||||
rb->snprintf(album_name, MAX_PATH, "/%s", get_album_name(center_index));
|
||||
rb->fix_path_part(album_name, 1, sizeof(album_name) - 2);
|
||||
file_name = album_name;
|
||||
attr = ATTR_DIRECTORY;
|
||||
}
|
||||
|
|
|
@ -900,7 +900,6 @@ static int dirbrowse(void)
|
|||
attr = ATTR_DIRECTORY;
|
||||
tagtree_get_entry_name(&tc, tc.selected_item,
|
||||
buf, sizeof(buf));
|
||||
fix_path_part(buf, 0, sizeof(buf));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue