[jamming] Problems with listing files in directories

Alen Ladavac alenl-ml at croteam.com
Tue May 23 23:37:55 PDT 2006


Hi Klaus,

> Sorry, but your version ended in a loop. RGLOB will be called again
> and agein recursively.

Is that the original version I sent or did you make some modifications
to it first? I've been using that version for years without a single
problem.

>>Also note that [ GLOB $(1) : * ] has a quirk that if $(1) is a file,
>>it will return that file.

Actually, looks like I mixed it up a bit here. It doesn't do that. It returns empty list when you GLOB on a file, and so...

> How can I test it agains inclusion?

... you can use if ! [ GLOB $(f) : * ] to test whether f is a file. This way you won't try to recurse into files.

HTH,
Alen




More information about the jamming mailing list