ln: follow a symlinked parent when replacing a link - #14851
costajohnt wants to merge 3 commits into
Conversation
Merging this PR will degrade performance by 16.32%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
| fn test_force_replace_in_symlinked_directory() { | ||
| let (at, mut ucmd) = at_and_ucmd!(); | ||
| at.mkdir("real"); | ||
| at.symlink_dir("real", "dirlink"); |
There was a problem hiding this comment.
could you please also cover the hard link case (-f without -s)? it goes through the same path
|
GNU testsuite comparison: |
|
Added the hard link case in fb256eb ( The CodSpeed failure is on |
replace_linkin uucore falls back to opening the destination's parent withO_NOFOLLOWonEEXIST. When the parent's last component is a symlink to a directory (ln -sf target dst/ucc/moduleswithdst/ucc -> somedir), that open fails with ENOTDIR, a regression from #14623.This drops
NOFOLLOWon the parent open (earlier path components were already followed, so it only broke this case) and addstest_force_replace_in_symlinked_directory.Closes #14795