On 10/6/20 3:02 PM, enh via Toybox wrote: > the recent dirtree changes seem to have regressed find(1): `find /etc/ > -maxdepth > 1` now shows /etc//passwd rather than /etc/passwd. > > haven't had chance to have a look at why yet...
Because I had a test that striped it in the recursive version, presumably because I hit that but didn't add a test for it. The non-recursive rewrite didn't include that test. And I once again confirmed it's NOT normalizing the path: $ find /etc/ -maxdepth 1 | grep '/passwd$' /etc/passwd $ find /etc// -maxdepth 1 | grep '/passwd$' /etc//passwd $ find /etc/// -maxdepth 1 | grep '/passwd$' /etc///passwd Just this single special case because special case. (Which can only happen with the initial path because getdir() isn't going to return a trailing / on the name. So my fix checking for it at every level isn't ideal, but eh. In a hurry.) Added a test this time, Rob _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net