summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2019-08-17 09:06:14 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2019-08-17 09:06:14 -0500
commit5a4cdb96b91078c7cd3f8d5a389aace68b530437 (patch)
tree764ad42cc105461a0ce134ca9543dc49e780f626
parentfd19a2caa29793174b9ac524903282244b9d3553 (diff)
downloadrockbox-5a4cdb96b91078c7cd3f8d5a389aace68b530437.tar.gz
rockbox-5a4cdb96b91078c7cd3f8d5a389aace68b530437.tar.bz2
rockbox-5a4cdb96b91078c7cd3f8d5a389aace68b530437.zip
Playlist Fix failure to append default file name pt2
fix create_playlist too Change-Id: Ic1de1382d5b534991253d662cb1b3aa5520f8887
-rw-r--r--apps/tree.c10
1 files 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);