Fix sprite unpack, launching V1

This commit is contained in:
Yohann D'ANELLO 2020-02-26 01:30:11 +01:00
parent 6fa111c872
commit 6bdae39915
1 changed files with 4 additions and 3 deletions

View File

@ -41,9 +41,10 @@ public class SpriteRegister {
String name = je.getName(); String name = je.getName();
if (name.startsWith("assets/")) { if (name.startsWith("assets/")) {
File f = new File(name); File f = new File(name);
if (name.endsWith("/") && !f.isDirectory()) if (name.endsWith("/")) {
if (!f.mkdirs()) if (!f.mkdirs() && !f.isDirectory())
throw new IOException("Unable to create make dir: " + f); throw new IOException("Unable to make dir: " + f);
}
else if (!f.isFile()) else if (!f.isFile())
Files.copy(jar.getInputStream(je), Paths.get(f.toURI())); Files.copy(jar.getInputStream(je), Paths.get(f.toURI()));
} }