From fdc3668a6a4d85fa6dde890ced7e9b850233bc0d Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Thu, 21 Mar 2024 18:27:23 -0400 Subject: [BugFix] Multiboot Database duplicate files When the sd card is mounted into the root namespace the database picks up files through both paths previously we hid the mounted drive but this causes issues with users databases when the drive letter changes Adds a way to keep track of volumes mounted in the root namespace Hides the enumerated volume in root Database: we can just parse the root directory ('/') and get to any mounted volume but we can also enumerate a volume in the root directory when this occurs it leads to multiple entries since the files can be reached through multiple paths ex, /Foo could also be /SD1/Foo Instead we will attempt to rewrite the root with any non-hidden volumes failing that just leave the paths alone Change-Id: I7bdba8cfaf63902d2a3852d28484bcf8ca317ebd --- firmware/common/dir.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'firmware/common/dir.c') diff --git a/firmware/common/dir.c b/firmware/common/dir.c index 45749b8474..9a78d910a7 100644 --- a/firmware/common/dir.c +++ b/firmware/common/dir.c @@ -344,3 +344,9 @@ struct dirinfo dir_get_info(DIR *dirp, struct dirent *entry) file_error: return (struct dirinfo){ .attribute = 0 }; } + +const char* root_realpath(void) +{ + /* Native only, for APP and SIM see respective filesystem-.c files */ + return root_get_realpath(); /* rb_namespace.c */ +} -- cgit v1.2.3