<div dir="ltr"><div>Here is how my src dict look like:</div><div>src/</div><div>├── 1.erl</div><div>├── 2.erl</div><div>├── 3.src</div><div>└── symlink -> ../../xxx/yyy/</div><div><br></div><div>and ' ../../xxx/yyy/' contains several '.proto' files</div>
<div><br></div><div>Here is what I did in erl console:</div><div><div>1> filelib:fold_files("src", ".*\\.proto$", true, fun(F, Acc) -> [F | Acc] end, []).</div><div>[]</div><div>2> filelib:fold_files("src", ".*\\.erl$", true, fun(F, Acc) -> [F | Acc] end, []).</div>
<div>["/home/xxx/src/1.erl",</div><div> "/home/xxx/src/2.erl"]</div><div>3> filelib:fold_files("src/symlink", ".*\\.proto$", true, fun(F, Acc) -> [F | Acc] end, []).</div><div>
["/home/xxx/src/symlink/1.proto",</div><div> "/home/xxx/src/symlink/2.proto"]</div></div><div><br></div><div>But as I remembered, filelib:fold_files works fine before I upgrade erlang.</div><div>My erlang version is 'Erlang/OTP 17 [erts-6.1] [source] [64-bit]' and it's running on Ubuntu 14.04</div>
<div><br></div><div>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!</div><div><br></div><div>Thanks,</div><div>Zhibo</div></div>