diff --git a/bigdata-core/bigdata/src/java/com/bigdata/resources/ResourceFileFilter.java b/bigdata-core/bigdata/src/java/com/bigdata/resources/ResourceFileFilter.java index 4489c15141..b65bbc6f7d 100644 --- a/bigdata-core/bigdata/src/java/com/bigdata/resources/ResourceFileFilter.java +++ b/bigdata-core/bigdata/src/java/com/bigdata/resources/ResourceFileFilter.java @@ -3,6 +3,7 @@ import java.io.File; import java.io.FileFilter; import java.io.IOException; +import java.nio.file.Paths; import org.apache.log4j.Logger; @@ -82,7 +83,7 @@ final public boolean accept(File f) { } - if (!fc.startsWith(resourceManager.getDataDir().getPath())) { + if (!Paths.get(fc).normalize().startsWith(resourceManager.getDataDir().getPath())) { throw new RuntimeException("File not in data directory: file=" + f + ", dataDir=" + resourceManager.dataDir);