Skip to content

Commit a9589c7

Browse files
committed
Fix RUSTUP_PERMIT_COPY_RENAME condition so it is actually used
The addition of the experimental io::ErrorKind::CrossesDevices variant prevented the RUSTUP_PERMIT_COPY_RENAME condition on io::ErrorKind::Other from matching. This shows why it is a bad idea to explicitly match on io::ErrorKind::Other rather than using the default pattern and it doesn't seem like there was any need to do that anyways given the raw_os_error condition.
1 parent f78aa86 commit a9589c7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/utils/utils.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,8 @@ where
622622
OperationResult::Retry(e)
623623
}
624624
#[cfg(target_os = "linux")]
625-
io::ErrorKind::Other
626-
if process().var_os("RUSTUP_PERMIT_COPY_RENAME").is_some()
627-
&& Some(EXDEV) == e.raw_os_error() =>
625+
_ if process().var_os("RUSTUP_PERMIT_COPY_RENAME").is_some()
626+
&& Some(EXDEV) == e.raw_os_error() =>
628627
{
629628
match copy_and_delete(name, src, dest, notify_handler) {
630629
Ok(()) => OperationResult::Ok(()),

0 commit comments

Comments
 (0)