[FIX] Create updates directory if not exist

This commit is contained in:
Gravita 2025-06-13 16:07:47 +07:00
parent f246ab697b
commit 0a163bb09c

View file

@ -115,6 +115,9 @@ CompletableFuture<DownloadedDir> downloadDir(Path targetDir, ProfileFeatureAPI.U
return CompletableFuture.supplyAsync(() -> {
try {
callback.onStage(LauncherBackendAPI.DownloadCallback.STAGE_HASHING);
if(!Files.exists(targetDir)) {
Files.createDirectories(targetDir);
}
HashedDir realFiles = new HashedDir(targetDir, matcher, false, true);
callback.onStage(LauncherBackendAPI.DownloadCallback.STAGE_DIFF);
return updateInfo.getHashedDir().diff(realFiles, matcher);