public class PartialPathTraversalBad {
    public void esapiExample(File dir, File parent) throws IOException {
        if (!dir.getCanonicalPath().startsWith(parent.getCanonicalPath())) {
            throw new IOException("Invalid directory: " + dir.getCanonicalPath());
        }
    }
}

@@ -53,13 +53,8 @@
 id e
-sapiE
 xamp

Update java/ql/src/Security/CWE/CWE-023/PartialPathTraversalBad.java