Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

multiboot_select plugin check volume root for valid firmware -- Try 2

I'm not sure why but on my fuze v2 I don't get the '.' nd '..'
directories back from readdir

that make removing '.' to find /.rockbox inconsistent

Instead filter out files and strcmp the incoming dirs
to BOOTDIR (.rockbox) and clear it when they match

Change-Id: Id8f3312cb3ae624dff1be21f745034c08c4ae1a7

+11 -2
+11 -2
apps/plugins/multiboot_select.c
··· 155 155 156 156 struct dirent* ent; 157 157 while((ent = rb->readdir(dir))) { 158 + /* skip non-directories */ 159 + if ((rb->dir_get_info(dir, ent).attribute & ATTR_DIRECTORY) == 0) { 160 + continue; 161 + } 162 + 158 163 const char *dname = ent->d_name; 159 - if (*dname == '.' && *(dname + 1) == '\0') 160 - dname++; /* skip the dot so we can check root of volume */ 164 + /* check for bootdir in the root of the volume */ 165 + if (rb->strcmp(bootdir, dname) == 0) { 166 + dname = ""; 167 + } 168 + 161 169 int r = rb->snprintf(tmpbuf, sizeof(tmpbuf), "/<%d>/%s/%s/%s", 162 170 vol, dname, bootdir, BOOTFILE); 171 + 163 172 if(r < 0 || (size_t)r >= sizeof(tmpbuf)) 164 173 continue; 165 174