Re: [code][textadept] file filtering

From: Mitchell <m.att.foicica.com>
Date: Wed, 10 Apr 2019 09:16:45 -0400 (EDT)

Hi Peter,

On Wed, 10 Apr 2019, Peter Rolf wrote:

> Am 09.04.2019 um 17:50 schrieb Mitchell:
>> Hi Peter,
>>
>> On Tue, 9 Apr 2019, Peter Rolf wrote:
>>
>>> Hi Mitchell,
>>>
>>> I am using "lfs.dir_foreach()" to scan a directory tree for "*.json"
>>> files. This works fast and reliable, but the lack of an include
>>> parameter for file filtering forces me to exclude all other existing
>>> file types by listing them in the filter.
>>>
>>> [snip]
>>
>> I'm not sure what's going wrong. When I open the Lua command entry and
>> enter:
>>
>>   lfs.dir_foreach(_HOME, print, {'.lua', '/core'})
>>
>> Textadept prints out .lua files in /core, but not those in /modules or
>> /themes, nor does it print out the other files like .png, .conf, .luadoc
>> in /core.
>>
>> To me this appears to be functioning properly.
>>
>> Granted, I am using a post 10.3 nightly build, but I don't think any
>> filter code has changed since 10.3 itself.
>>
>> Do you have a simple file tree that you can submit, along with your
>> filter, that demonstrates the issue so that I can debug? Thanks.
>>
>
> Sorry, no simple file tree available. More the opposite (30.5G, 32928
> file in 3391 directories).
>
> Anyhow, I tested a bit and just ".json" as filter works fine. But as
> soon as I add exclusive directories it breaks. You can try this with
>
> lfs.dir_foreach(_HOME, print, {'.lua', '!/core'})
>
> which just lists "init.lua" here (ignoring all other sub directories,
> not only "core"). Maybe I have missed something in the syntax...

I think you've found a bug. I will look into this when I have some time. Sorry for the inconvenience :(

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 10 Apr 2019 - 09:16:45 EDT

This archive was generated by hypermail 2.2.0 : Thu 11 Apr 2019 - 06:41:24 EDT