<div dir="ltr">For example, I have a directory "foo" and a symlink "bar" to "foo".<div>While I can access file, I get error trying to ensure_dir:</div><div><div>2> file:read_file("bar/baz").   </div>

<div>{ok,<<>>}</div><div>3> filelib:ensure_dir("bar/baz").</div><div>{error,eexist}</div><div><br></div>This is because filelib:do_is_dir/2 does not expect a symlink to dir.</div><div><br></div><div>

Is it expected behavior or should I submit a patch for that?</div><div>(This breaks at least lager which does filelib:ensure_dir before opening a log)</div><div><div><br></div>-- <br><div dir="ltr"><div><font face="'courier new', monospace">Danil Zagoskin | <a href="mailto:z@gosk.in" target="_blank">z@gosk.in</a></font></div>

</div></div></div>