mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 23:33:12 +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
@@ -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