summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 7fcced92c8..e35f769a14 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -967,11 +967,17 @@ int rockbox_browse(struct browse_context *browse)
967 if (*tc.dirfilter >= NUM_FILTER_MODES) 967 if (*tc.dirfilter >= NUM_FILTER_MODES)
968 { 968 {
969 int last_context; 969 int last_context;
970 /* don't reset if its the same browse already loaded */
971 if (tc.browse != browse ||
972 !(tc.currdir[1] && strcmp(tc.currdir, browse->root) == 0))
973 {
974 tc.browse = browse;
975 tc.selected_item = 0;
976 tc.dirlevel = 0;
977
978 strlcpy(tc.currdir, browse->root, sizeof(tc.currdir));
979 }
970 980
971 tc.browse = browse;
972 tc.selected_item = 0;
973 tc.dirlevel = 0;
974 strlcpy(tc.currdir, browse->root, sizeof(tc.currdir));
975 start_wps = false; 981 start_wps = false;
976 last_context = curr_context; 982 last_context = curr_context;
977 983