This bug completely breaks https://github.com/ciao-lang/ciao installation on Ubuntu 25.10.
The Rust implementation of dirname is giving different output than GNU coreutils for paths that end with /.
What I'm seeing
On GNU coreutils:
On rust coreutils (Ubuntu 25.10):
It works on Ubuntu 25.05 and macOS but breaks on Ubuntu 25.10 because of this dirname behavior difference.
According to POSIX, dirname should "remove the suffix from the last '/' to the end of string". For a/b/., the last / is between b and ., so removing everything after that should give you a/b.