mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 15:04:52 +09:00
Ignore error loading mod in fetchMod
If a bad download or file transfer causes a mod in a host's mod folder to become corrupt the attempt to load the mod will throw an error that's not the file not existing. This in turn causes starting the instance to always fail as the mod is never attempted to be re-downloaded. Fix by ignoring errors attempting to load mods already present in the mods folder that aren't in the mod store so that a new download is attempted after that fails.
This commit is contained in:
1 parent
e8d9eb6916
commit
c9609259db
2 files changed
+3
-1
No files matched your search
@@ -14,6 +14,7 @@
|
||||
- Fixed data export with a mod using shorthand notation for the default value of a color-setting causing the ModPack data to be set to invalid data.
|
||||
- Fixed per user per instance player stats not being deleted when the instance it's for is deleted.
|
||||
- Fixed mods setting the item prototype icons property to an object mapping instead of an array breaking the data export.
|
||||
- Fixed a bad mod in the host's mods folder causing instance start to fail instead of the host re-downloading the mod.
|
||||
|
||||
|
||||
## Version 2.0.0-alpha.16
|
||||
|
||||
@@ -600,8 +600,9 @@ export default class Host extends lib.Link {
|
||||
try {
|
||||
modInfo = await this.modStore.loadMod(mod.name, mod.version);
|
||||
} catch (err: any) {
|
||||
// A broken zip file may have been left in the mods folder
|
||||
if (err.code !== "ENOENT") {
|
||||
throw err;
|
||||
logger.error(`Error loading mod ${mod.name} ${mod.version}: ${err.message}`);
|
||||
}
|
||||
}
|
||||
if (modInfo && (!mod.sha1 || mod.sha1 === modInfo.sha1)) {
|
||||
|
||||
Reference in new issue
Block a user