Fix "Create Playlist" option in context menu of "Playlist Catalogue"

If the previously selected directory in the file browser was the playlist directory,
creating a playlist with all files wouldn't work due to the fact that
PLAYLIST_CATALOG_DEFAULT_DIR has an unexpected duplicate leading '/'.

The initialize_catalog function makes sure to remove this from playlist_dir.

Change-Id: I0f8300140fa23321d362d2a75dfaf82be0b4b12a
This commit is contained in:
Christian Soffke 2021-03-11 17:26:25 +01:00 committed by Solomon Peachy
parent 49c230f630
commit adac2c8880

View file

@ -342,8 +342,7 @@ bool catalog_add_to_a_playlist(const char* sel, int sel_attr,
/* If sel is empty, root, or playlist directory we use 'all' */
if (!sel || !strcmp(sel, "/") || !strcmp(sel, playlist_dir))
{
if (!sel || !strcmp(sel, PLAYLIST_CATALOG_DEFAULT_DIR))
sel = "/";
sel = "/";
name = "/all";
}
else /*If sel is a folder, we prefill the text field with its name*/