Skip to main content

is_cross_device_link

Function is_cross_device_link 

Source
pub fn is_cross_device_link(err: &Error) -> bool
Expand description

Returns true when an io::Error indicates a rename (or other link-style operation) attempted to bridge two filesystems (EXDEV). This is what trips when temp_path lands on a different mount than the destination — typically because TMPDIR is on a different volume, or the parent directory itself is a bind mount. We match both the portable ErrorKind::CrossesDevices and the raw EXDEV code.