From a83f22593337f1eac2ead1e5b5354a09256ce242 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Mon, 30 Oct 2023 19:29:12 +0700 Subject: [PATCH] [FIX] File not exist --- .../src/main/java/pro/gravit/launcher/modern/Downloader.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java b/LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java index 986c50ad..6cecfc9e 100644 --- a/LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java +++ b/LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java @@ -147,6 +147,11 @@ public CompletableFuture getFuture() { } public CompletableFuture downloadFile(URI uri, Path path) { + try { + IOHelper.createParentDirs(path); + } catch (IOException e) { + return CompletableFuture.failedFuture(e); + } return client.sendAsync(HttpRequest.newBuilder() .GET() .uri(uri)