diff --git a/legacy/src/main/java/thredds/cataloggen/config/LocalDatasetSource.java b/legacy/src/main/java/thredds/cataloggen/config/LocalDatasetSource.java index fb2835750a..d6c7b77c04 100644 --- a/legacy/src/main/java/thredds/cataloggen/config/LocalDatasetSource.java +++ b/legacy/src/main/java/thredds/cataloggen/config/LocalDatasetSource.java @@ -108,7 +108,7 @@ private void checkAccessPoint() throws IOException { // Check that accessPoint file starts with accessPointHeader. if (!apFile.getPath().startsWith(aphFile.getPath()) - && !apFile.getCanonicalPath().startsWith(aphFile.getCanonicalPath())) { + && !apFile.getCanonicalFile().toPath().startsWith(aphFile.getCanonicalFile().toPath())) { String tmpMsg = "The accessPoint <" + apFile.getPath() + " or " + apFile.getCanonicalPath() + "> must start with the accessPointHeader <" + aphFile.getPath() + " or " + aphFile.getCanonicalPath() + ">.";