Skip to main content

write_target_trap

Function write_target_trap 

Source
pub fn write_target_trap(
    op: &str,
    guest_path: &str,
    err: &ContainError,
) -> Error
Expand description

Distinguish a missing parent from an escaping one at the point a write first touches the filesystem.

Both surface as a failure to create, and keeping them apart is what an LLM needs: one is fixable with mkdir, the other can never succeed. The parent.is_dir() pre-check this replaced conflated them the other way — it reported every escape as a missing parent, costing a turn on a mkdir that could never work.