1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2024-11-27 12:46:22 +01:00

Fix extraction of folders inside ZipExtract (#271)

This commit is contained in:
Henry 2020-12-24 23:18:54 +00:00 committed by GitHub
commit dd62193b0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,9 +46,13 @@ public class ZipExtract implements Runnable {
while ((entry = zis.getNextEntry()) != null) { while ((entry = zis.getNextEntry()) != null) {
if (matches(entry)) { if (matches(entry)) {
File file = new File(getDestination(), entry.getName()); File file = new File(getDestination(), entry.getName());
if (entry.isDirectory()) {
file.mkdirs();
} else {
writeEntry(zis, file); writeEntry(zis, file);
} }
} }
}
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} finally { } finally {