Log a mod folder that cannot be listed, and let the game take long paths where Windows allows them.

A folder in a mod's RomFS that could not be listed (no permission, or a path longer than 260 characters, as a mod
deep in a long game folder makes) lost its files without a word in the log; the walk now names it. The manifest
asks for long path support, so where Windows has it switched on (LongPathsEnabled) those files are served.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-08 08:57:58 -05:00
parent d0e9ba6b30
commit 771c4f4fb1
2 changed files with 10 additions and 2 deletions

View File

@@ -455,7 +455,10 @@ static int mod_walk_cb(const char *leaf, int kind, uint64_t size, void *ctx) {
// The files under dir (a mod's RomFS root; rel: the RomFS path of dir, "" at the root) as overlays of mod k.
static void mod_walk(int k, int prio, const char *dir, const char *rel) {
ModWalk w = {k, prio, dir, rel};
plat_fs_list(dir, mod_walk_cb, &w);
// a folder that cannot be listed (no permission, a path longer than Windows allows) loses its files: say so
if (plat_fs_list(dir, mod_walk_cb, &w) != PLAT_FS_OK)
rt_log("mods: %s: cannot list %s (error %d); its files are left out", mods_at(k)->name, dir,
plat_fs_os_error());
}
// What overlays compete on: the RomFS index, an added file's path; the higher prio first.