diff --git a/izpack-tools/src/main/java/com/izforge/izpack/util/FileUtil.java b/izpack-tools/src/main/java/com/izforge/izpack/util/FileUtil.java index 8a9f0e5d24..5c611a13e5 100644 --- a/izpack-tools/src/main/java/com/izforge/izpack/util/FileUtil.java +++ b/izpack-tools/src/main/java/com/izforge/izpack/util/FileUtil.java @@ -243,7 +243,7 @@ public static String getRelativeFileName(File file, File basedir) throws IOExcep } String canonicalFilePath = file.getCanonicalPath(); String canonicalBaseDirPath = basedir.getCanonicalPath(); - if (canonicalFilePath.startsWith(canonicalBaseDirPath)) + if (file.getCanonicalFile().toPath().startsWith(canonicalBaseDirPath)) { int length = canonicalBaseDirPath.length(); if (length < canonicalFilePath.length())