mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2026-01-21 12:41:13 +00:00
Merge pull request #4782 from cakebaker/mv_no_clobber_behavior_change
mv: adapt -n behavior to GNU mv 9.3
This commit is contained in:
commit
360cbda0c5
2 changed files with 9 additions and 3 deletions
|
|
@ -419,7 +419,12 @@ fn rename(
|
|||
}
|
||||
|
||||
match b.overwrite {
|
||||
OverwriteMode::NoClobber => return Ok(()),
|
||||
OverwriteMode::NoClobber => {
|
||||
return Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("not replacing {}", to.quote()),
|
||||
));
|
||||
}
|
||||
OverwriteMode::Interactive => {
|
||||
if !prompt_yes!("overwrite {}?", to.quote()) {
|
||||
return Err(io::Error::new(io::ErrorKind::Other, ""));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue