mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2026-01-15 01:31:08 +00:00
* realpath: Match behavior where resolving symlinks with absolute path is an error if ENOENT This PR changes `realpath` to match the behavior in GNU where, ```shell hbina@akarin ~/Documents> mkdir dir1 hbina@akarin ~/Documents> mkdir dir2 hbina@akarin ~/Documents> touch dir2/bar hbina@akarin ~/Documents> ln -s ../dir2/bar dir1/foo1 hbina@akarin ~/Documents> ln -s /dir2/bar dir1/foo2 hbina@akarin ~/Documents> ln -s ../dir2/baz dir1/foo3 hbina@akarin ~/Documents> realpath ./dir1/foo1 ./dir1/foo2 ./dir1/foo3 /home/hbina/Documents/dir2/bar realpath: ./dir1/foo2: No such file or directory /home/hbina/Documents/dir2/baz ``` Currently, our `realpath` will happily print the second one out, ```shell hbina@akarin ~/Documents> ~/git/uutils/target/debug/coreutils realpath ./dir1/foo1 ./dir1/foo2 ./dir1/foo3 /home/hbina/Documents/dir2/bar /dir2/bar /home/hbina/Documents/dir2/baz ``` Closes https://github.com/uutils/coreutils/issues/3036 Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com> |
||
|---|---|---|
| .. | ||
| benches/factor | ||
| by-util | ||
| common | ||
| fixtures | ||
| test_util_name.rs | ||
| tests.rs | ||