{"record":{"id":"6b39ef4d6366c83e","repo":"openai/codex","slug":"path-is-invalid-on-os","errorCode":null,"errorMessage":"'{path}' is invalid on '{os}'","messagePattern":"'(.+?)' is invalid on '(.+?)'","errorType":"validation","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/utils/path-uri/src/lib.rs","lineNumber":503,"sourceCode":"                    component => {\n                        segments.push(component);\n                        depth += 1;\n                    }\n                }\n            }\n        }\n        Self::try_from(url)\n    }\n\n    /// Converts this file URI to a path using the current host's path rules.\n    ///\n    /// The URI's inferred path convention must match the current host. Conversion should succeed\n    /// when the URI was created from an [`AbsolutePathBuf`] on the current host, including fallback\n    /// URIs created by [`Self::from_abs_path`]. Foreign conventions are rejected rather than being\n    /// projected onto a syntactically valid but unrelated host path.\n    pub fn to_abs_path(&self) -> io::Result<AbsolutePathBuf> {\n        if self.infer_path_convention() != Some(PathConvention::native()) {\n            return Err(io::Error::new(\n                io::ErrorKind::InvalidInput,\n                PathUriParseError::InvalidFileUriPath {\n                    path: self.to_string(),\n                },\n            ));\n        }\n        if let Some(path_bytes) = decode_bad_path_uri(&self.0) {\n            #[cfg(unix)]\n            let decoded_path = {\n                use std::os::unix::ffi::OsStringExt;\n                Some(std::path::PathBuf::from(std::ffi::OsString::from_vec(\n                    path_bytes,\n                )))\n            };\n            #[cfg(windows)]\n            let decoded_path = {\n                use std::os::windows::ffi::OsStringExt;\n                path_bytes.len().is_multiple_of(2).then(|| {","sourceCodeStart":485,"sourceCodeEnd":521,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/utils/path-uri/src/lib.rs#L485-L521","documentation":"Error \"'{path}' is invalid on '{os}'\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/utils/path-uri/src/lib.rs:503 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}