From 5a4cdb96b91078c7cd3f8d5a389aace68b530437 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sat, 17 Aug 2019 09:06:14 -0500 Subject: [PATCH] Playlist Fix failure to append default file name pt2 fix create_playlist too Change-Id: Ic1de1382d5b534991253d662cb1b3aa5520f8887 --- apps/tree.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/tree.c b/apps/tree.c index 9581ef8531..8f0abf4a8b 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -942,14 +942,12 @@ static int dirbrowse(void) int create_playlist(void) { char filename[MAX_PATH + 16]; /* add enough space for extension */ - - if (tc.currdir[1]) + const char *playlist_dir = catalog_get_directory(); + if (strcmp(tc.currdir, playlist_dir) != 0) snprintf(filename, sizeof filename, "%s.m3u8", tc.currdir); else - snprintf(filename, sizeof filename, "%s/all.m3u8", - catalog_get_directory()); - - + snprintf(filename, sizeof filename, "%s/all.m3u8", playlist_dir); + if (kbd_input(filename, MAX_PATH)) return 0; splashf(0, "%s %s", str(LANG_CREATING), filename);