mirror of
https://github.com/uutils/coreutils.git
synced 2025-07-07 21:45:01 +00:00
ln: don't show error when overwriting a link with -sfn (#7449)
Some checks failed
GnuTests / Run GNU tests (push) Has been cancelled
Android / Test builds (push) Has been cancelled
CICD / Style/cargo-deny (push) Has been cancelled
CICD / Style/deps (push) Has been cancelled
CICD / Documentation/warnings (push) Has been cancelled
CICD / MinRustV (push) Has been cancelled
CICD / Dependencies (push) Has been cancelled
CICD / Code Coverage (push) Has been cancelled
CICD / Separate Builds (push) Has been cancelled
Code Quality / Style/format (push) Has been cancelled
Code Quality / Style/lint (push) Has been cancelled
Code Quality / Style/spelling (push) Has been cancelled
Code Quality / Style/toml (push) Has been cancelled
Code Quality / Style/Python (push) Has been cancelled
FreeBSD / Style and Lint (push) Has been cancelled
FreeBSD / Tests (push) Has been cancelled
CICD / Test all features separately (push) Has been cancelled
CICD / Build/Makefile (push) Has been cancelled
CICD / Build/stable (push) Has been cancelled
CICD / Build/nightly (push) Has been cancelled
CICD / Binary sizes (push) Has been cancelled
CICD / Build (push) Has been cancelled
CICD / Tests/BusyBox test suite (push) Has been cancelled
CICD / Tests/Toybox test suite (push) Has been cancelled
CICD / Build/SELinux (push) Has been cancelled
Some checks failed
GnuTests / Run GNU tests (push) Has been cancelled
Android / Test builds (push) Has been cancelled
CICD / Style/cargo-deny (push) Has been cancelled
CICD / Style/deps (push) Has been cancelled
CICD / Documentation/warnings (push) Has been cancelled
CICD / MinRustV (push) Has been cancelled
CICD / Dependencies (push) Has been cancelled
CICD / Code Coverage (push) Has been cancelled
CICD / Separate Builds (push) Has been cancelled
Code Quality / Style/format (push) Has been cancelled
Code Quality / Style/lint (push) Has been cancelled
Code Quality / Style/spelling (push) Has been cancelled
Code Quality / Style/toml (push) Has been cancelled
Code Quality / Style/Python (push) Has been cancelled
FreeBSD / Style and Lint (push) Has been cancelled
FreeBSD / Tests (push) Has been cancelled
CICD / Test all features separately (push) Has been cancelled
CICD / Build/Makefile (push) Has been cancelled
CICD / Build/stable (push) Has been cancelled
CICD / Build/nightly (push) Has been cancelled
CICD / Binary sizes (push) Has been cancelled
CICD / Build (push) Has been cancelled
CICD / Tests/BusyBox test suite (push) Has been cancelled
CICD / Tests/Toybox test suite (push) Has been cancelled
CICD / Build/SELinux (push) Has been cancelled
* ln: fix #6350 * test(ln): test_symlink_no_deref_dir success has no stderr
This commit is contained in:
parent
94132060b6
commit
1baedc417b
2 changed files with 6 additions and 1 deletions
|
@ -301,6 +301,7 @@ fn link_files_in_dir(files: &[PathBuf], target_dir: &Path, settings: &Settings)
|
|||
show_error!("Could not update {}: {e}", target_dir.quote());
|
||||
};
|
||||
}
|
||||
#[cfg(windows)]
|
||||
if target_dir.is_dir() {
|
||||
// Not sure why but on Windows, the symlink can be
|
||||
// considered as a dir
|
||||
|
|
|
@ -549,7 +549,11 @@ fn test_symlink_no_deref_dir() {
|
|||
scene.ucmd().args(&["-sn", dir1, link]).fails();
|
||||
|
||||
// Try with the no-deref
|
||||
scene.ucmd().args(&["-sfn", dir1, link]).succeeds();
|
||||
scene
|
||||
.ucmd()
|
||||
.args(&["-sfn", dir1, link])
|
||||
.succeeds()
|
||||
.no_stderr();
|
||||
assert!(at.dir_exists(dir1));
|
||||
assert!(at.dir_exists(dir2));
|
||||
assert!(at.is_symlink(link));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue