{"record":{"id":"8cb2edab01492a1b","repo":"openai/codex","slug":"path-must-name-an-entry","errorCode":null,"errorMessage":"path must name an entry","messagePattern":"path must name an entry","errorType":"validation","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/exec-server/src/no_follow/unix.rs","lineNumber":85,"sourceCode":"    )\n    .map_err(io::Error::from)\n}\n\nfn open_directory(parent: &OwnedFd, name: &OsString) -> io::Result<OwnedFd> {\n    openat(\n        parent,\n        name,\n        directory_access_flags() | OFlags::DIRECTORY | OFlags::NOFOLLOW | OFlags::CLOEXEC,\n        Mode::empty(),\n    )\n    .map_err(io::Error::from)\n}\n\nfn parent(path: &Path) -> io::Result<(OwnedFd, OsString)> {\n    let mut components = components(path)?;\n    let leaf = components\n        .pop()\n        .ok_or_else(|| io::Error::new(io::ErrorKind::InvalidInput, \"path must name an entry\"))?;\n    let mut directory = root()?;\n    for component in components {\n        directory = open_directory(&directory, &component)?;\n    }\n    Ok((directory, leaf))\n}\n\nfn open_entry_sync(path: &Path) -> io::Result<std::fs::File> {\n    let (parent, leaf) = parent(path)?;\n    let file = openat(\n        &parent,\n        leaf,\n        OFlags::RDONLY | OFlags::NOFOLLOW | OFlags::NONBLOCK | OFlags::CLOEXEC,\n        Mode::empty(),\n    )\n    .map_err(io::Error::from)?;\n    Ok(std::fs::File::from(file))\n}","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/exec-server/src/no_follow/unix.rs#L67-L103","documentation":"Error \"path must name an entry\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/exec-server/src/no_follow/unix.rs:85 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the trailing slash; the path must name an entry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}