From 60887a43129f5d5f98379ddbb3e72bf05cb167f6 Mon Sep 17 00:00:00 2001 From: comp500 Date: Mon, 7 Dec 2020 17:42:52 +0000 Subject: [PATCH] Whoops --- src/main/kotlin/link/infra/packwiz/installer/DownloadTask.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/link/infra/packwiz/installer/DownloadTask.kt b/src/main/kotlin/link/infra/packwiz/installer/DownloadTask.kt index 9c9a19d..9e4d3fb 100644 --- a/src/main/kotlin/link/infra/packwiz/installer/DownloadTask.kt +++ b/src/main/kotlin/link/infra/packwiz/installer/DownloadTask.kt @@ -177,7 +177,7 @@ internal class DownloadTask private constructor(val metadata: IndexFile.File, de if (fileSource.hashIsEqual(hash)) { // isDirectory follows symlinks, but createDirectories doesn't - if (Files.isDirectory(destPath.parent)) { + if (!Files.isDirectory(destPath.parent)) { Files.createDirectories(destPath.parent) } Files.copy(data.inputStream(), destPath, StandardCopyOption.REPLACE_EXISTING)