From 97c6fd0892efe3a1da25532e4ce76344b522d4df Mon Sep 17 00:00:00 2001 From: Magnus Holmgren Date: Sat, 30 Jul 2005 18:12:25 +0000 Subject: [PATCH] 'Move to Next Folder' didn't work if it involved going up to the root of the drive. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7265 a1c6a512-1295-4272-9138-f99709370657 --- apps/playlist.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/playlist.c b/apps/playlist.c index 9a22addbc3..d1c83f0fbf 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)