openai/codex · error · io::Error
no-follow filesystem operations require a local disk or UNC…
Error message
no-follow filesystem operations require a local disk or UNC path
What it means
Returned by nt_path when the path prefix is neither a disk nor UNC volume prefix (e.g. a device or other exotic prefix). Only local disk and UNC paths can be converted into the \\??\ NT namespace used by the no-follow file operations.
Solutions
- Use a normal drive-letter path such as C:\... or a \\server\share UNC path
- Resolve device-namespace paths (\\.\...) through a different API
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at codex-rs/exec-server/src/no_follow/windows.rs:93 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/46870f41b816dc93.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/exec-server/src/no_follow/windows.rs:93
) -> NTSTATUS;
}
fn nt_path(path: &Path) -> io::Result<Vec<u16>> {
if !path.is_absolute() {
return Err(io::Error::new(
io::ErrorKind::InvalidInput,
"no-follow filesystem operations require an absolute path",
));
}
let (prefix, source_offset) = match path.components().next() {
Some(Component::Prefix(prefix)) => match prefix.kind() {
Prefix::Disk(_) => ("\\??\\", 0),
Prefix::VerbatimDisk(_) => ("\\??\\", 4),
Prefix::UNC(_, _) => ("\\??\\UNC\\", 2),
Prefix::VerbatimUNC(_, _) => ("\\??\\UNC\\", 8),
_ => {
return Err(io::Error::new(
io::ErrorKind::InvalidInput,
"no-follow filesystem operations require a local disk or UNC path",
));
}
},
_ => {
return Err(io::Error::new(
io::ErrorKind::InvalidInput,
"no-follow filesystem operations require an absolute Windows path",
));
}
};
let mut result: Vec<u16> = OsStr::new(prefix).encode_wide().collect();
result.extend(
path.as_os_str()
.encode_wide()
.skip(source_offset)View on GitHub (pinned to 339751715c)