[erlang-bugs] filelib:ensure_dir/1 broken with symlinks

Anthony Ramine n.oxyde@REDACTED
Sat Jun 28 12:01:41 CEST 2014


Also, wildcard/2 is broken if passed prim_file, because eval_read_file_info/2’s third clause will still call Mod:read_file_info/1 instead of Mod:read_link_info/1.

Wrote a preliminary patch of which I am dubious of its quality, please comment:

	https://github.com/nox/otp/commit/d3ba773f81ffcef449dbf574ba15824996e7c479

Regards,

-- 
Anthony Ramine

Le 27 juin 2014 à 22:14, José Valim <jose.valim@REDACTED> a écrit :

> Unfortunately the commit shown above also seems to have broken:
> 
> * filelib:is_regular/1
> * filelib:is_dir/1
> * filelib:is_file/1
> 
> As they no longer traverse symlinks and rather return the symlink information.
> 
> filelib:last_modified/1 and filelib:file_size/1 are likely broken too (basically all functions that use eval_read_file_info/2 besides filelib:wildcard/3).
> 
> 
> José Valim
> www.plataformatec.com.br
> Skype: jv.ptec
> Founder and Lead Developer
> 
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs




More information about the erlang-bugs mailing list