On 16/11/2026 20:18, Paul Eggert wrote:
On 2026-11-16 08:02, Bayes Coratio wrote:
Would such a change be acceptable? If so, I can try to prepare a patch with a
test.
I think POSIX requires the symlink to be followed in this case,
unfortunately.
Yes I agree.
Though the final rmdir behavior is a bit confusing / inconsistent.
The warning suppression with -f is not appropriate as that's
really only allowed for missing items, not items of the wrong type.
Also it's inconsistent to leave the target directory in place.
We could avoid both issues by having the final rmdir,
remove the target directory rather than the symlink.
I checked FreeBSD, and this is what it does.
cheers,
Padraig.