You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create two regular files, README.md and good/README.md, and a directory target/ that does not contain anything named README.md.
chdir into target/.
Try to copy in symlink-mode the files ../README.md and ../good/README.md to the current directory
Expected result: The first copy is successful, the second copy is refused with an error message that acknowledges that README.md was just created and must not be recreated.
Actual result: The first copy is successful, the second copy is refused with an error message that treats the newly-created README.md symlink as a file that always existed.
This also feels like it might lead to some other unexpected behavior, but I can't get it to do something worse like overwrite pointed-to files.
Demonstrator:
coreutils$ cd target/coreutils/target$ rm -f README.md && ../../gnu/src/cp -s ../README.md ../good/README.md .../../gnu/src/cp: will not overwrite just-created './README.md' with '../good/README.md'[$? = 1]coreutils/target$ rm -f README.md && cargo run cp -s ../README.md ../good/README.md . cp: will not copy '../good/README.md' through just-created symlink './README.md'[$? = 1]
$
Steps to reproduce:
README.md
andgood/README.md
, and a directorytarget/
that does not contain anything namedREADME.md
.target/
.../README.md
and../good/README.md
to the current directoryExpected result: The first copy is successful, the second copy is refused with an error message that acknowledges that
README.md
was just created and must not be recreated.Actual result: The first copy is successful, the second copy is refused with an error message that treats the newly-created
README.md
symlink as a file that always existed.This also feels like it might lead to some other unexpected behavior, but I can't get it to do something worse like overwrite pointed-to files.
Demonstrator:
Found while reviewing #6208
The text was updated successfully, but these errors were encountered: