mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-16 05:01:44 +03:00
Next IOExc fix.
This commit is contained in:
parent
78def447ce
commit
b984fa9d73
2 changed files with 2 additions and 1 deletions
|
@ -32,6 +32,7 @@ public JARLauncherBinary(LaunchServer server) throws IOException {
|
||||||
guardDir = server.dir.resolve(Launcher.GUARD_DIR);
|
guardDir = server.dir.resolve(Launcher.GUARD_DIR);
|
||||||
buildDir = server.dir.resolve("build");
|
buildDir = server.dir.resolve("build");
|
||||||
tasks = new ArrayList<>();
|
tasks = new ArrayList<>();
|
||||||
|
Files.createDirectory(buildDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,7 +16,7 @@ public static boolean unpack(URL resource, Path target) throws IOException {
|
||||||
if (matches(target, resource)) return false;
|
if (matches(target, resource)) return false;
|
||||||
}
|
}
|
||||||
Files.deleteIfExists(target);
|
Files.deleteIfExists(target);
|
||||||
Files.createFile(target);
|
IOHelper.createParentDirs(target);
|
||||||
try (InputStream in = IOHelper.newInput(resource)) {
|
try (InputStream in = IOHelper.newInput(resource)) {
|
||||||
IOHelper.transfer(in, target);
|
IOHelper.transfer(in, target);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue