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.
This bug completely breaks https://github.com/ciao-lang/ciao installation on Ubuntu 25.10.
The Rust implementation of
dirnameis giving different output than GNU coreutils for paths that end with/.What I'm seeing
On GNU coreutils:
$ dirname "a/b/." a/bOn rust coreutils (Ubuntu 25.10):
$ dirname "a/b/." aIt 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 betweenband., so removing everything after that should give youa/b.