From 0fb9d99100752c4f893562882c0347a8c041471f Mon Sep 17 00:00:00 2001 From: ZaneYork Date: Fri, 6 Mar 2020 23:41:19 +0800 Subject: [PATCH] Fix install bug --- app/build.gradle | 4 ++-- .../java/com/zane/smapiinstaller/logic/ModAssetsManager.java | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 281748f..3a3e91c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "com.zane.smapiinstaller" minSdkVersion 19 targetSdkVersion 28 - versionCode 3 - versionName "1.1.0" + versionCode 4 + versionName "1.1.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" multiDexEnabled true diff --git a/app/src/main/java/com/zane/smapiinstaller/logic/ModAssetsManager.java b/app/src/main/java/com/zane/smapiinstaller/logic/ModAssetsManager.java index 1acde43..613c2cf 100644 --- a/app/src/main/java/com/zane/smapiinstaller/logic/ModAssetsManager.java +++ b/app/src/main/java/com/zane/smapiinstaller/logic/ModAssetsManager.java @@ -110,6 +110,9 @@ public class ModAssetsManager { Joiner.on(",").join(Lists.transform(installedMods, item -> CommonLogic.toPrettyPath(item.getAssetPath()))))); return false; } + else if(installedModMap.size() == 0) { + installedMods = installedModMap.get(mod.getUniqueID().replace("ZaneYork.CustomLocalization", "SMAPI.CustomLocalization")); + } try { ZipUtil.unpack(context.getAssets().open(mod.getAssetPath()), new File(installedMods.get(0).getAssetPath()), (name)-> StringUtils.removeStart(name, mod.getName() + "/")); } catch (IOException e) {