1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2026-01-16 02:01:05 +00:00

mv: gnu test case to-symlink fix

This commit is contained in:
mhead 2024-07-17 21:39:36 +05:30 committed by Ben Wiederhake
parent 9ab7fa9806
commit ff12e6ee87
2 changed files with 37 additions and 0 deletions

View file

@ -661,6 +661,9 @@ fn rename_with_fallback(
};
}
} else {
if to.is_symlink() {
fs::remove_file(to)?;
}
#[cfg(all(unix, not(any(target_os = "macos", target_os = "redox"))))]
fs::copy(from, to)
.and_then(|_| fsxattr::copy_xattrs(&from, &to))