Fix install bug

This commit is contained in:
ZaneYork 2020-03-06 23:41:19 +08:00
parent 4d018857ad
commit 0fb9d99100
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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) {