mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 00:13:13 +09:00
Make sure checksum matches in ModsTable
Validate sha1 sum matches for a mod used in ModsTable if it is present. This prevents showing details for a zip file where the version matches but the cheksum does not.
This commit is contained in:
1 parent
dfadc62720
commit
32cf9321cc
1 file changed
+7
-1
@@ -211,7 +211,13 @@ function ModsTable(props) {
|
|||||||
|
|
||||||
const modListMap = new Map(modList.map(mod => [`${mod.name}_${mod.version}`, mod]));
|
const modListMap = new Map(modList.map(mod => [`${mod.name}_${mod.version}`, mod]));
|
||||||
const mods = [...props.modPack.mods.values(), ...deletedMods.values()].map(
|
const mods = [...props.modPack.mods.values(), ...deletedMods.values()].map(
|
||||||
mod => modListMap.get(`${mod.name}_${mod.version}`) || mod
|
mod => {
|
||||||
|
const candidate = modListMap.get(`${mod.name}_${mod.version}`);
|
||||||
|
if (!candidate || mod.sha1 && candidate.sha1 !== mod.sha1) {
|
||||||
|
return mod;
|
||||||
|
}
|
||||||
|
return candidate;
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
function actions(mod) {
|
function actions(mod) {
|
||||||
|
|||||||
Reference in new issue
Block a user