summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-03-13 17:40:17 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2022-03-13 17:40:17 -0400
commit6fdc160fab05c4119c2547b4986c0e78b017a53b (patch)
treef6090a3b0bac6ad2159e93ac6bbaed7e23e77e0b
parent6d122e3932b8793aca21636780acf19f63d5aca9 (diff)
downloadrockbox-6fdc160fab.tar.gz
rockbox-6fdc160fab.zip
dircache_redirect.h, hide root volume when only one mounted
there is no need to show the root of the drive when only the internal is mounted Change-Id: I310c48befa51742d05b6d5ce501d0b7c2c7c7ab7
-rw-r--r--firmware/include/dircache_redirect.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/include/dircache_redirect.h b/firmware/include/dircache_redirect.h
index 52110b17a7..5c3f630d74 100644
--- a/firmware/include/dircache_redirect.h
+++ b/firmware/include/dircache_redirect.h
@@ -161,7 +161,10 @@ static inline void volume_onmount_internal(IF_MV_NONVOID(int volume))
root_unmount_volume(volume); /* unmount so root can be hidden*/
#endif
if (rtlen <= 0) /* Error occurred, card removed? Set root to default */
+ {
+ root_unmount_volume(volume); /* unmount so root can be hidden*/
goto standard_redirect;
+ }
root_mount_path(rtpath, NSITEM_CONTENTS);
}