<div dir="ltr">yeah, that patch fixes it for me. i'll sync AOSP.<div><br></div><div>thanks!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 6, 2020 at 1:43 PM Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 10/6/20 3:02 PM, enh via Toybox wrote:<br>
> the recent dirtree changes seem to have regressed find(1): `find /etc/ -maxdepth<br>
> 1` now shows /etc//passwd rather than /etc/passwd.<br>
> <br>
> haven't had chance to have a look at why yet...<br>
<br>
Because I had a test that striped it in the recursive version, presumably<br>
because I hit that but didn't add a test for it. The non-recursive rewrite<br>
didn't include that test.<br>
<br>
And I once again confirmed it's NOT normalizing the path:<br>
<br>
$ find /etc/ -maxdepth 1 | grep '/passwd$'<br>
/etc/passwd<br>
$ find /etc// -maxdepth 1 | grep '/passwd$'<br>
/etc//passwd<br>
$ find /etc/// -maxdepth 1 | grep '/passwd$'<br>
/etc///passwd<br>
<br>
Just this single special case because special case. (Which can only happen with<br>
the initial path because getdir() isn't going to return a trailing / on the<br>
name. So my fix checking for it at every level isn't ideal, but eh. In a hurry.)<br>
<br>
Added a test this time,<br>
<br>
Rob<br>
</blockquote></div>