filelib:ensure_dir/1 and symlink to dir
Danil Zagoskin <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.bugs |
|---|---|
| Message-ID | <CAJ6dJEj4PvU1518vP2XsE78oxfowFGHpb6A5cY=GbF2MfTt=xg@mail.gmail.com> |
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 | [email protected]
_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs