{"record":{"id":"249f93d756783d32","repo":"zed-industries/zed","slug":"cannot-grant-sandbox-write-access-to-only-wi","errorCode":null,"errorMessage":"cannot grant sandbox write access to `{}`: only Windows drive paths (`C:\\...`) and WSL absolute paths (`/...`) are supported","messagePattern":"cannot grant sandbox write access to `(.+?)`: only Windows drive paths \\(`C:\\\\\\.\\.\\.`\\) and WSL absolute paths \\(`/\\.\\.\\.`\\) are supported","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/sandbox/src/windows_wsl.rs","lineNumber":355,"sourceCode":"        ensure!(\n            parse_native_drive_path(&canonical.to_string_lossy()).is_ok(),\n            \"cannot grant sandbox write access to `{}`: it resolves to `{}`, \\\n             which is not a Windows drive path\",\n            requested.display(),\n            canonical.display()\n        );\n        // A Windows drive is reached inside WSL via DrvFs (weaker guarantees), so\n        // a native-drive grant is on a Windows filesystem by definition.\n        return Ok(ResolvedGrant {\n            canonical,\n            on_windows_fs: true,\n        });\n    }\n\n    // Otherwise the grant must be a Linux-absolute WSL path, which only WSL can\n    // canonicalize. `\\\\wsl.localhost\\...` and other shapes are rejected.\n    let wsl_path = parse_wsl_absolute_path(&path_string).map_err(|_| {\n        anyhow::anyhow!(\n            \"cannot grant sandbox write access to `{}`: only Windows drive paths \\\n             (`C:\\\\...`) and WSL absolute paths (`/...`) are supported\",\n            requested.display()\n        )\n    })?;\n    let mapping = PathMapping::Wsl(wsl_path);\n\n    let wsl_exe = wsl_exe_path();\n    if !wsl_exe.is_file() {\n        return Err(unavailable(format!(\n            \"WSL (`wsl.exe`) was not found at `{}`\",\n            wsl_exe.display()\n        )));\n    }\n\n    // Translate + existence-check the path inside WSL, then resolve its\n    // symlink-free canonical (and classify its filesystem) via the helper. No\n    // distro is pinned — a sandboxed command runs in one distro.","sourceCodeStart":337,"sourceCodeEnd":373,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/sandbox/src/windows_wsl.rs#L337-L373","documentation":"Validation in windows_wsl.rs resolve_canonical_for_grant(): the write-grant path is neither a Windows drive path (C:\\...) nor a WSL absolute path (/...), so the sandbox cannot resolve or bind-mount it inside WSL. Only those two path shapes are supported.","triggerScenarios":"Thrown at crates/sandbox/src/windows_wsl.rs:355 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Grant write access only to Windows drive paths or WSL absolute paths","Move the working directory to a supported path"],"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"}