[erlang-bugs] filelib:ensure_dir/1 and symlink to dir

José Valim jose.valim@REDACTED
Mon Jun 30 21:45:49 CEST 2014


Danil, I am assuming you are running on Erlang 17.1. If so, this bug has
been reported in a previous thread:

http://erlang.org/pipermail/erlang-bugs/2014-June/004465.html



*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Lead Developer


On Sun, Jun 29, 2014 at 11:02 PM, Danil Zagoskin <z@REDACTED> wrote:

> For example, I have a directory "foo" and a symlink "bar" to "foo".
> While I can access file, I get error trying to ensure_dir:
> 2> file:read_file("bar/baz").
> {ok,<<>>}
> 3> filelib:ensure_dir("bar/baz").
> {error,eexist}
>
> This is because filelib:do_is_dir/2 does not expect a symlink to dir.
>
> Is it expected behavior or should I submit a patch for that?
> (This breaks at least lager which does filelib:ensure_dir before opening a
> log)
>
> --
> Danil Zagoskin | z@REDACTED
>
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140630/105dabe6/attachment.htm>


More information about the erlang-bugs mailing list