Next IOExc fix.

This commit is contained in:
zaxar163 2019-01-08 18:01:59 +04:00
parent 78def447ce
commit b984fa9d73
No known key found for this signature in database
GPG key ID: CEE900027AE098E0
2 changed files with 2 additions and 1 deletions

View file

@ -32,6 +32,7 @@ public JARLauncherBinary(LaunchServer server) throws IOException {
guardDir = server.dir.resolve(Launcher.GUARD_DIR);
buildDir = server.dir.resolve("build");
tasks = new ArrayList<>();
Files.createDirectory(buildDir);
}
@Override

View file

@ -16,7 +16,7 @@ public static boolean unpack(URL resource, Path target) throws IOException {
if (matches(target, resource)) return false;
}
Files.deleteIfExists(target);
Files.createFile(target);
IOHelper.createParentDirs(target);
try (InputStream in = IOHelper.newInput(resource)) {
IOHelper.transfer(in, target);
}