[Forge Installer 1.12+] Remove the first slash

This commit is contained in:
ArtDev 2020-11-23 19:49:05 +03:00 committed by GitHub
parent a4ef351d69
commit 1495928bb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,7 @@ public class NewForgeInstaller extends BaseInstaller {
versionFile.mkdir();
target = versionFile.getAbsolutePath() + "/" + profile.version + ".json";
ctx.appendlnToLog("Writing " + target + " from " + profile.json);
ZipEntry versionJson = mJarFile.getEntry(profile.json==null ? "/version.json" : profile.json);
ZipEntry versionJson = mJarFile.getEntry(profile.json==null ? "version.json" : profile.json.substring(profile.json.indexOf("/")+1,profile.json.length());
Tools.write(
target,
Tools.convertStream(mJarFile.getInputStream(versionJson))