{"record":{"id":"f8db1cef8515b743","repo":"zed-industries/zed","slug":"windows-sandboxing-via-wsl-can-only-use-an-existin","errorCode":null,"errorMessage":"Windows sandboxing via WSL can only use an existing directory as cwd: {}","messagePattern":"Windows sandboxing via WSL can only use an existing directory as cwd: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/sandbox/src/windows_wsl.rs","lineNumber":1419,"sourceCode":"        \"PROCESSOR_IDENTIFIER\",\n        \"PROCESSOR_LEVEL\",\n        \"PROCESSOR_REVISION\",\n    ];\n    !BLOCKED\n        .iter()\n        .any(|blocked| name.eq_ignore_ascii_case(blocked))\n}\n\nfn push_bind(args: &mut Vec<String>, flag: &str, source: &str, destination: &str) {\n    args.extend([\n        flag.to_string(),\n        source.to_string(),\n        destination.to_string(),\n    ]);\n}\n\nfn directory_to_wsl(path: &Path) -> Result<PathMapping> {\n    ensure!(\n        path.is_dir(),\n        \"Windows sandboxing via WSL can only use an existing directory as cwd: {}\",\n        path.display()\n    );\n    map_path_to_wsl(path)\n}\n\nfn path_to_wsl(path: &Path) -> Result<PathMapping> {\n    let path_string = path.to_string_lossy();\n    if let Ok(path) = parse_wsl_absolute_path(&path_string) {\n        return Ok(PathMapping::Wsl(path));\n    }\n\n    ensure!(\n        path.is_dir() || path.is_file(),\n        \"Windows sandboxing via WSL can only grant existing files or directories: {}\",\n        path.display()\n    );","sourceCodeStart":1401,"sourceCodeEnd":1437,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/sandbox/src/windows_wsl.rs#L1401-L1437","documentation":"Raised in directory_to_wsl when the requested cwd for a Windows-via-WSL sandboxed command is not an existing directory. The WSL sandbox binds the cwd into the distro; it cannot create or map a nonexistent directory, so wrapping fails with the offending path shown.","triggerScenarios":"Thrown at crates/sandbox/src/windows_wsl.rs:1419 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the directory (or open an existing project directory) before sandboxing","Check the path resolves to a directory inside the chosen WSL distro"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}