mirror of
https://github.com/Anvilcraft/modpacktools
synced 2025-03-14 12:09:59 +01:00
fix really stupid mistake when downloading mods in BuildTwitch
This commit is contained in:
parent
4cfc122dea
commit
a212e03e59
1 changed files with 5 additions and 4 deletions
|
@ -53,15 +53,16 @@ object BuildTwitch : ICommand {
|
|||
} else if(uf.key.isURL) {
|
||||
val filePath = URL(uf.key.link)
|
||||
toDownload[filePath] = Pair(File(downloadDir, FilenameUtils.getName(filePath.toString())), uf.value)
|
||||
FileDownloader(toDownload.mapValues {it.value.first}, {
|
||||
println("downloaded file ${it.file}")
|
||||
println(installFile(toDownload[it.url]!!.second, it.file))
|
||||
}, FileDownloader.ExistingFileBehaviour.OVERWRITE)
|
||||
} else {
|
||||
return fail("{$uf.key.link} is neither a file nor an URL")
|
||||
}
|
||||
}
|
||||
|
||||
FileDownloader(toDownload.mapValues {it.value.first}, {
|
||||
println("downloaded file ${it.file}")
|
||||
println(installFile(toDownload[it.url]!!.second, it.file))
|
||||
}, FileDownloader.ExistingFileBehaviour.OVERWRITE)
|
||||
|
||||
val zip = ZipOutputStream(FileOutputStream(dir.path + "/$archiveName.zip"))
|
||||
tmp.toZip(zip)
|
||||
zip.flush()
|
||||
|
|
Loading…
Add table
Reference in a new issue