[FEATURE] launcherinstaller forge WIP

This commit is contained in:
Gravita 2021-07-11 22:46:41 +07:00
parent 9112ca0c88
commit ac15002327
2 changed files with 5 additions and 3 deletions

View file

@ -7,6 +7,7 @@
import java.io.IOException;
import java.io.OutputStream;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer;
@ -56,8 +57,9 @@ public static void downloadFile(URL url, Path file, Consumer<Integer> chanheTrac
public static void downloadZip(URL url, Path dir) throws IOException {
try (ZipInputStream input = IOHelper.newZipInput(url)) {
for (ZipEntry entry = input.getNextEntry(); entry != null; entry = input.getNextEntry()) {
if (entry.isDirectory())
continue; // Skip directories
if (entry.isDirectory()) {
Files.createDirectory(dir.resolve(IOHelper.toPath(entry.getName())));
}
// Unpack entry
String name = entry.getName();
LogHelper.subInfo("Downloading file: '%s'", name);

@ -1 +1 @@
Subproject commit ee796454c63c6dcc39419f03fe1518326c7bcf20
Subproject commit 7f7a4bf268e70ee64d08baaa2049308332ddfc4e