diff --git a/jbake-core/src/main/java/org/jbake/app/FileUtil.java b/jbake-core/src/main/java/org/jbake/app/FileUtil.java index c80dbf9e..ef1c2d17 100644 --- a/jbake-core/src/main/java/org/jbake/app/FileUtil.java +++ b/jbake-core/src/main/java/org/jbake/app/FileUtil.java @@ -328,6 +328,6 @@ public static boolean isFileInDirectory(File file, File directory) throws IOExce return (file.exists() && !file.isHidden() && directory.isDirectory() - && file.getCanonicalPath().startsWith(directory.getCanonicalPath())); + && file.getCanonicalFile().toPath().startsWith(directory.getCanonicalFile().toPath())); } }