a52c81e270
**Before merging: Please test on a real Windows installation if possible!** I tested this on Linux as well as inside a Windows VM hosted on Linux, but wasn't able to test it on a real Windows installation. This commit fixes an issue with loading bundles from a native Linux server: When compiling the server natively for Linux & installing some mods, everything works except for mods trying to load bundles from the server. Reason is a malformed path to the bundle: ```ts 2024-07-30 23:48:16.968 +02:00|0.14.9.1.30626|Error|Default| EXCEPTION: System.IO.DirectoryNotFoundException: Could not find a part of the path "C:\home\USER\Games\escape-from-tarkov\drive_c\SPTarkov\user\mods\Bloody-Bullet-Wounds\bundles\assets\systems\effects\particlesystems\effects.bundle". ``` `process.cwd()` returns the linux-agnostic path of course, but for some reason it also returns `C:`. Changing the line to `modpath.slice(0, -1).replace(/\\/g, "/");` seems to work and the bundles seem to get loaded without issues (did a quick test raid), even without passing the absolute path to the mod. I tried to check why that is, and I think node is able to [get the cwd and resolve the relative path]( |
||
---|---|---|
.. | ||
BundleLoader.ts | ||
ModLoadOrder.ts | ||
ModTypeCheck.ts | ||
PostDBModLoader.ts | ||
PostSptModLoader.ts | ||
PreSptModLoader.ts |