[erlang-questions] filelib:fold_files doesnt work for symlink anymore (on Erlang/OTP 17)?

Zhibo Wei zweicmu@REDACTED
Wed Jul 9 12:42:30 CEST 2014


Ah.... thats why

Thanks for lettingme know!

Thanks,
Zhibo


On Wed, Jul 9, 2014 at 3:39 AM, José Valim <jose.valim@REDACTED>
wrote:

> It is a regression on Erlang 17.1.
>
> It has been reported here:
> http://erlang.org/pipermail/erlang-bugs/2014-June/004465.html
>
> And a pull request to fix it is here:
> https://github.com/erlang/otp/pull/417
>
>
>
> *José Valim*
> www.plataformatec.com.br
> Skype: jv.ptec
> Founder and Lead Developer
>
>
> On Wed, Jul 9, 2014 at 10:49 AM, Zhibo Wei <zweicmu@REDACTED> wrote:
>
>> Here is how my src dict look like:
>> src/
>> ├── 1.erl
>> ├── 2.erl
>> ├── 3.src
>> └── symlink -> ../../xxx/yyy/
>>
>> and ' ../../xxx/yyy/' contains several '.proto' files
>>
>> Here is what I did in erl console:
>> 1> filelib:fold_files("src", ".*\\.proto$", true, fun(F, Acc) -> [F |
>> Acc] end, []).
>> []
>> 2> filelib:fold_files("src", ".*\\.erl$", true, fun(F, Acc) -> [F | Acc]
>> end, []).
>> ["/home/xxx/src/1.erl",
>>  "/home/xxx/src/2.erl"]
>> 3> filelib:fold_files("src/symlink", ".*\\.proto$", true, fun(F, Acc) ->
>> [F | Acc] end, []).
>> ["/home/xxx/src/symlink/1.proto",
>>  "/home/xxx/src/symlink/2.proto"]
>>
>> But as I remembered, filelib:fold_files works fine before I upgrade
>> erlang.
>> My erlang version is 'Erlang/OTP 17 [erts-6.1] [source] [64-bit]' and
>> it's running on Ubuntu 14.04
>>
>> Is this a known issue of Erlang? Is there any work around to make this
>> working other than downgrade erlang? Please let me know, thanks a lot!
>>
>> Thanks,
>> Zhibo
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140709/28925bfa/attachment.htm>


More information about the erlang-questions mailing list