Fix sprite unpack, launching V1
This commit is contained in:
parent
6fa111c872
commit
6bdae39915
|
@ -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()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue