diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playlist_catalog.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c index dffc1671da..10c4f8b47c 100644 --- a/apps/playlist_catalog.c +++ b/apps/playlist_catalog.c | |||
@@ -306,7 +306,11 @@ bool catalog_add_to_a_playlist(const char* sel, int sel_attr, | |||
306 | size_t len; | 306 | size_t len; |
307 | if (m3u8name == NULL) | 307 | if (m3u8name == NULL) |
308 | { | 308 | { |
309 | snprintf(playlist, MAX_PATH, "%s/", playlist_dir); | 309 | /*If sel is a folder, we prefill the text field with its name*/ |
310 | const char *name = strrchr(sel, '/'); | ||
311 | snprintf(playlist, MAX_PATH, "%s/%s", | ||
312 | playlist_dir, | ||
313 | (name!=NULL && (sel_attr & ATTR_DIRECTORY))?name+1:""); | ||
310 | if (kbd_input(playlist, MAX_PATH)) | 314 | if (kbd_input(playlist, MAX_PATH)) |
311 | return false; | 315 | return false; |
312 | } | 316 | } |