diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/tree.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/apps/tree.c b/apps/tree.c index 745b4ebef6..cf12c4abc2 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -1225,7 +1225,14 @@ static bool dirbrowse(const char *root, const int *dirfilter) | |||
1225 | /* plugin file */ | 1225 | /* plugin file */ |
1226 | case TREE_ATTR_ROCK: | 1226 | case TREE_ATTR_ROCK: |
1227 | if (plugin_load(buf,NULL) == PLUGIN_USB_CONNECTED) | 1227 | if (plugin_load(buf,NULL) == PLUGIN_USB_CONNECTED) |
1228 | reload_root = true; | 1228 | { |
1229 | if(*dirfilter > NUM_FILTER_MODES) | ||
1230 | /* leave sub-browsers after usb, doing | ||
1231 | otherwise might be confusing to the user */ | ||
1232 | exit_func = true; | ||
1233 | else | ||
1234 | reload_root = true; | ||
1235 | } | ||
1229 | else | 1236 | else |
1230 | restore = true; | 1237 | restore = true; |
1231 | break; | 1238 | break; |
@@ -1487,7 +1494,14 @@ static bool dirbrowse(const char *root, const int *dirfilter) | |||
1487 | 1494 | ||
1488 | default: | 1495 | default: |
1489 | if(default_event_handler(button) == SYS_USB_CONNECTED) | 1496 | if(default_event_handler(button) == SYS_USB_CONNECTED) |
1490 | reload_root = true; | 1497 | { |
1498 | if(*dirfilter > NUM_FILTER_MODES) | ||
1499 | /* leave sub-browsers after usb, doing otherwise | ||
1500 | might be confusing to the user */ | ||
1501 | exit_func = true; | ||
1502 | else | ||
1503 | reload_root = true; | ||
1504 | } | ||
1491 | break; | 1505 | break; |
1492 | } | 1506 | } |
1493 | 1507 | ||