[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [BusyBox] using '*' in a directory name -> BASH-iness broken in
From: "Vladimir N. Oleynik" <dzo () simtreas ! ru>
Date: 2001-07-27 4:20:35
[Download RAW message or body]
Tom Cameron wrote:
>
> Hello again,
> I have just been a victim of the Windowshade Effect (tm). I
> all-of-a-sudden realized what is going on with my scripts. Essentially, I
> have some to the conclusion that the BASH compliance in ASH has changed
> since Erik made it part of BB itself.
> What is really happening is that my scripts are saying:
>
> ---------------
> for q in /somedir/somewhere/*/somevar; do
> echo $f
> done
> ---------------
>
> This used to work quite well, but as I said, it is quite broken now.
> I was originally using Vlad's ash applet...so it's something that he had
> woking. Does anyone (Erik/Vlad) know where to look to add this
> functionality, or do more changes to the parsing need to be done? anyway, I
> just wanted to let you know. Anyone want me to post an official "bug" to
> the list?
Yes, it is costs of the transition version (ash-0.2->0.3) and bad realization
glob(3).
Pattern: .../*/... it is for some reason considered not containing metasymbols
:-0
(tested with glibc 2.1.3 and uclibc last)
A hand-held patch, I can not publish a real
patch as I are not accepted my 21-22 patches.
- switch (glob(p, GLOB_NOMAGIC, 0, &pglob)) {
+ switch (glob(p, 0, 0, &pglob)) {
case 0:
- if (!(pglob.gl_flags & GLOB_MAGCHAR))
+ if(pglob.gl_pathv[1]==0 && !strcmp(p,
pglob.gl_pathv[0]))
--w
vodz
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic