summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/playlist.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 9a22add..d1c83f0 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -1169,7 +1169,14 @@ static int check_subdir_for_music(char *dir, char *subdir)
if (result < 0)
{
- dir[dirlen] = '\0';
+ if (dirlen)
+ {
+ dir[dirlen] = '\0';
+ }
+ else
+ {
+ strcpy(dir, "/");
+ }
/* we now need to reload our current directory */
if(ft_load(tc, dir) < 0)