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.

strnatcmp: Sort dots first

Moves special folders (like .rockbox) on top and makes filenames sorting look more consistent with folders sorting. See https://forums.rockbox.org/index.php/topic,55303

Change-Id: I6ffd9b3ea0acfcbab69f09415f4e9f53737e7769

authored by

Roman Artiukhin and committed by
Solomon Peachy
3cb4e632 e08b8fcc

+9
+9
firmware/common/strnatcmp.c
··· 154 154 return cmp_fn(a,b); 155 155 } 156 156 157 + // Place dots before any chars (but after end of line '\0') 158 + // It makes filenames sorting more natural by placing shorter names before longer ones. 159 + // Without fix: Song (Live).mp3, Song.mp3 160 + // With fix: Song.mp3, Song (Live).mp3 161 + if (ca == '.') 162 + ca = 1; 163 + if (cb == '.') 164 + cb = 1; 165 + 157 166 if (cmp_fn == &strcasecmp) { 158 167 ca = nat_unify_case(ca); 159 168 cb = nat_unify_case(cb);