summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-07-03 08:43:38 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-07-03 08:43:38 +0000
commit2ca895bae7a25ea8ef7f295b4e8ab01ff75a4914 (patch)
treef59b6552f67d56a7bed5f5041757ea4b41ce7ab0 /apps
parent7b861eca95b54f4132e2ed6a8f9c0edbf0a65ab8 (diff)
downloadrockbox-2ca895bae7a25ea8ef7f295b4e8ab01ff75a4914.tar.gz
rockbox-2ca895bae7a25ea8ef7f295b4e8ab01ff75a4914.zip
Fix FS#7387 - trying to go into the file browser when the last folder was on the MMC/mSD card (which was removed) would go into an infinite loop.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13768 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/root_menu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index 9858fed35d..24cb80a8b3 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -34,6 +34,7 @@
34#include "power.h" 34#include "power.h"
35#include "talk.h" 35#include "talk.h"
36#include "audio.h" 36#include "audio.h"
37#include "hotswap.h"
37 38
38#if (LCD_DEPTH > 1) || (defined(HAVE_LCD_REMOTE) && (LCD_REMOTE_DEPTH > 1)) 39#if (LCD_DEPTH > 1) || (defined(HAVE_LCD_REMOTE) && (LCD_REMOTE_DEPTH > 1))
39#include "backdrop.h" 40#include "backdrop.h"
@@ -100,6 +101,12 @@ static int browser(void* param)
100 { 101 {
101 strcpy(folder, wps_state.current_track_path); 102 strcpy(folder, wps_state.current_track_path);
102 } 103 }
104#ifdef HAVE_HOTSWAP /* quick hack to stop crashing if you try entering
105 the browser from the menu when you were in the card
106 and it was removed */
107 else if (strchr(last_folder, '<') && (card_detect() == false))
108 strcpy(folder, "/");
109#endif
103 else 110 else
104 strcpy(folder, last_folder); 111 strcpy(folder, last_folder);
105 break; 112 break;