Skip to content

Commit

Permalink
add very basic and crude file deletion after installation
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoosk committed Jun 18, 2024
1 parent 6c51411 commit a9c7809
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ class LoaderManager(private val configFile: ConfigFile, private val internetMana
// http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.12.2-14.23.3.2682/forge-1.12.2-14.23.3.2682-installer.jar
//val installerPath = File(basePath + "forge-" + versionString + "-installer.jar")
val installerPath = File(basePath + "installer.jar")
val runUnix = File(basePath + "run.sh")
val runWin = File(basePath + "run.bat")
val userArg = File(basePath + "user_jvm_args.txt")
val installerLog = File(basePath + "installer.jar.log")
val modpackDL = File(basePath + "modpack-download.zip")
val manifest = File(basePath + "manifest.json")



try {
Expand Down Expand Up @@ -158,9 +165,13 @@ class LoaderManager(private val configFile: ConfigFile, private val internetMana
lockFile.mcVersion = mcVersion
ServerStarter.saveLockFile(lockFile)


installerPath.delete()

runUnix.delete()
runWin.delete()
userArg.delete()
installerLog.delete()
modpackDL.delete()
manifest.delete()

checkEULA(basePath)
} catch (e: IOException) {
Expand Down

0 comments on commit a9c7809

Please sign in to comment.