diff --git a/src/main/java/link/infra/packwiz/installer/DownloadTask.java b/src/main/java/link/infra/packwiz/installer/DownloadTask.java index 7149be7..417a63e 100644 --- a/src/main/java/link/infra/packwiz/installer/DownloadTask.java +++ b/src/main/java/link/infra/packwiz/installer/DownloadTask.java @@ -124,7 +124,7 @@ void download(String packFolder, SpaceSafeURI indexUri) { // Don't update files marked with preserve if they already exist on disk if (metadata.preserve) { - if (Files.exists(destPath)) { + if (destPath.toFile().exists()) { return; } } diff --git a/src/main/java/link/infra/packwiz/installer/UpdateManager.java b/src/main/java/link/infra/packwiz/installer/UpdateManager.java index 92408d6..962a15d 100644 --- a/src/main/java/link/infra/packwiz/installer/UpdateManager.java +++ b/src/main/java/link/infra/packwiz/installer/UpdateManager.java @@ -161,7 +161,7 @@ private void start() { // if isn't optional, or is optional but optionValue == true if (!entry.getValue().isOptional || entry.getValue().optionValue) { if (entry.getValue().cachedLocation != null) { - if (!Files.exists(Paths.get(opts.packFolder, entry.getValue().cachedLocation))) { + if (!Paths.get(opts.packFolder, entry.getValue().cachedLocation).toFile().exists()) { invalid = true; } } else {