diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2021-03-11 17:26:25 +0100 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-03-11 19:43:48 +0000 |
commit | adac2c88803962ad10375676e2c4e82ba25ea40b (patch) | |
tree | 178f87e36726e428c7ff059477a6f5dad97fdeb3 /apps/playlist_catalog.c | |
parent | 49c230f630fcc00f30aad33f92da02cd35519ca8 (diff) | |
download | rockbox-adac2c88803962ad10375676e2c4e82ba25ea40b.tar.gz rockbox-adac2c88803962ad10375676e2c4e82ba25ea40b.zip |
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
Diffstat (limited to 'apps/playlist_catalog.c')
-rw-r--r-- | apps/playlist_catalog.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c index 1181f73e3f..9d31ac333c 100644 --- a/apps/playlist_catalog.c +++ b/apps/playlist_catalog.c | |||
@@ -342,8 +342,7 @@ bool catalog_add_to_a_playlist(const char* sel, int sel_attr, | |||
342 | /* If sel is empty, root, or playlist directory we use 'all' */ | 342 | /* If sel is empty, root, or playlist directory we use 'all' */ |
343 | if (!sel || !strcmp(sel, "/") || !strcmp(sel, playlist_dir)) | 343 | if (!sel || !strcmp(sel, "/") || !strcmp(sel, playlist_dir)) |
344 | { | 344 | { |
345 | if (!sel || !strcmp(sel, PLAYLIST_CATALOG_DEFAULT_DIR)) | 345 | sel = "/"; |
346 | sel = "/"; | ||
347 | name = "/all"; | 346 | name = "/all"; |
348 | } | 347 | } |
349 | else /*If sel is a folder, we prefill the text field with its name*/ | 348 | else /*If sel is a folder, we prefill the text field with its name*/ |