forked from len0rd/rockbox
Hotswap support in file browser: Don't reload the root dir if not in the root and the current path is still valid.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6405 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
251deaa4ca
commit
54d43ef0c1
1 changed files with 10 additions and 3 deletions
13
apps/tree.c
13
apps/tree.c
|
@ -1119,9 +1119,16 @@ static bool dirbrowse(void)
|
|||
case SYS_FS_CHANGED:
|
||||
if (!id3db) /* file browsing */
|
||||
{
|
||||
/* FixMe: skip this if not in root
|
||||
and our path is still valid */
|
||||
reload_root = true; /* the dumb way */
|
||||
if (currdir[1]) /* not in the root */
|
||||
{
|
||||
DIR *dir = opendir(currdir);
|
||||
if (dir) /* path still valid */
|
||||
{
|
||||
closedir(dir);
|
||||
break; /* don't reload the root */
|
||||
}
|
||||
}
|
||||
reload_root = true;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue