From 8a0d9d37087b33ab10a5860a337fe6fe114dc9de Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sat, 19 Jun 2021 13:38:23 +0200 Subject: [PATCH] Fixed NPE when compiling in the local directory. Closes #671 --- src/main/java/dk/camelot64/kickc/OutputFileManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/dk/camelot64/kickc/OutputFileManager.java b/src/main/java/dk/camelot64/kickc/OutputFileManager.java index 3557d8413..116c534db 100644 --- a/src/main/java/dk/camelot64/kickc/OutputFileManager.java +++ b/src/main/java/dk/camelot64/kickc/OutputFileManager.java @@ -276,7 +276,7 @@ public class OutputFileManager { * @return true if the resources should be copied */ public boolean shouldCopyResources() { - final Path cFileDirectory = primaryCFile.getParent().toAbsolutePath(); + final Path cFileDirectory = primaryCFile.toAbsolutePath().getParent(); final Path outputDirectory = getOutputDirectory().toAbsolutePath(); return !cFileDirectory.equals(outputDirectory); }