From dfb01ebdf19d7c818820896f3cafee962eaa2cff Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 7 May 2022 01:12:20 -0400 Subject: [PATCH] Fixed mod crash --- core/src/mindustry/mod/Mods.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/core/src/mindustry/mod/Mods.java b/core/src/mindustry/mod/Mods.java index 5e4ae643f1..5de3785019 100644 --- a/core/src/mindustry/mod/Mods.java +++ b/core/src/mindustry/mod/Mods.java @@ -783,14 +783,15 @@ public class Mods implements Loadable{ ObjectMap> dependencies = new ObjectMap<>(); for(Fi file : files){ - Fi zip = file.isDirectory() ? file : new ZipFi(file); - - if(zip.list().length == 1 && zip.list()[0].isDirectory()){ - zip = zip.list()[0]; - } - ModMeta meta = null; + try{ + Fi zip = file.isDirectory() ? file : new ZipFi(file); + + if(zip.list().length == 1 && zip.list()[0].isDirectory()){ + zip = zip.list()[0]; + } + meta = findMeta(zip); }catch(Exception ignored){ }