arbron/fvtt-hp-bar

Case-sensitivity bug when system.name contains capital letters

Closed this issue · 0 comments

If FoundryVTT is running on a Linux host, filenames are case sensitive. The following line will attempt to load "D35E.mjs" from the systems folder, but no such file exists! Only d35e.mjs exists. If the host is Windows, the OS basically resolves it and makes the bug disappear. But Linux honors the filename case, and the file is just not found.

const drawingModule = await import(`./systems/${system.id ?? system.name}.mjs`);

To fix this, all that you need to do is rename scripts/systems/d35e.mjs to scripts/systems/D35E.mjs

I suspect that this might hold true for other systems where "system.name" contains capital letters... but I don't run any of those systems so therefore cannot confirm.