1
0
Fork 0
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:
Jens Arnold 2005-05-05 00:27:41 +00:00
parent 251deaa4ca
commit 54d43ef0c1

View file

@ -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