diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/tree.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/tree.c b/apps/tree.c index 31f436ce78..d713a2378b 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -1119,9 +1119,16 @@ static bool dirbrowse(void) | |||
1119 | case SYS_FS_CHANGED: | 1119 | case SYS_FS_CHANGED: |
1120 | if (!id3db) /* file browsing */ | 1120 | if (!id3db) /* file browsing */ |
1121 | { | 1121 | { |
1122 | /* FixMe: skip this if not in root | 1122 | if (currdir[1]) /* not in the root */ |
1123 | and our path is still valid */ | 1123 | { |
1124 | reload_root = true; /* the dumb way */ | 1124 | DIR *dir = opendir(currdir); |
1125 | if (dir) /* path still valid */ | ||
1126 | { | ||
1127 | closedir(dir); | ||
1128 | break; /* don't reload the root */ | ||
1129 | } | ||
1130 | } | ||
1131 | reload_root = true; | ||
1125 | } | 1132 | } |
1126 | break; | 1133 | break; |
1127 | #endif | 1134 | #endif |