ash: fix slash treatment in expmeta
authorRon Yorston <rmy@pobox.com>
Fri, 4 Sep 2015 09:32:41 +0000 (10:32 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 4 Sep 2015 20:23:54 +0000 (22:23 +0200)
commitca25af9b06b0c3ded77ac70087227896b34003c4
tree6fd2f8a870814464e1b76e8c2573a8bd303acd20
parentb5be13ccd9ce2120468a381a5475955013c0f049
ash: fix slash treatment in expmeta

Commit 549deab caused this sequence of commands:

   mkdir foo
   cd foo
   touch a b
   echo "./"*

to return './*' instead of the expected './a ./b'.  The problem
was caused by the backport of commit 880d952 from dash.  In dash
the issue was fixed by two further commits by Herbert Xu:

<d6d06ff> [EXPAND] Fixed non-leading slash treatment in expmeta
<36f0fa8> [EXPAND] Fix slash treatment in expmeta

(See git://git.kernel.org/pub/scm/utils/dash/dash.git)

Apply these fixes to BusyBox ash, thus causing the new test
glob3.tests to succeed.

function                                             old     new   delta
expmeta                                              469     528     +59

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c