Skip to main content

safe_canonicalize_bounded

Function safe_canonicalize_bounded 

Source
pub fn safe_canonicalize_bounded(path: &Path, timeout_ms: u64) -> PathBuf
Expand description

Canonicalize with a timeout guard. Protects against hangs on WSL2 DrvFS, Windows reparse points, NFS, FUSE, sshfs, and other slow filesystems. Falls back to the original path if canonicalize doesn’t complete within the timeout. Self-healing: after a timeout, subsequent calls to slow mounts skip the thread entirely.