[erlang-patches] Additional error-handling file:path_open/3

Fredrik fredrik@REDACTED
Fri Jan 11 15:59:04 CET 2013


Hello,
I don't see a reply on this, but I am happy to tell you that this patch 
was merged to master the 13th of December!
Thanks for your contribution!

BR Fredrik Gustafsson
Erlang OTP Team
On 11/04/2012 03:54 PM, Thomas Järvstrand wrote:
> Hi!
>
> file:path_open/3 currently doesn't handle eisdir or enotdir return 
> values from file:open/2. Suppose we want to do path_open(["dir1", 
> "dir2"], "sub/file") and dir2/sub/file is the actual path of the file 
> that we are looking for. The effect of not handling these error cases 
> is that the call will fail if dir1 happens to contain either a regular 
> file called sub (file:open/2 returns enotdir) or a directory sub that 
> in turn contains a directory file (file:open/2 return eisdir).
>
> This patch handles these extra error cases in file:path_open/3
>
> Repo:
> git fetch git@REDACTED:tjarvstrand/otp.git 
> additional-error-cases-in-path_open
>
> Comparison:
> https://github.com/tjarvstrand/otp/compare/additional-error-cases-in-path_open
> https://github.com/tjarvstrand/otp/compare/additional-error-cases-in-path_open.patch
>
> Regards
> Thomas Järvstrand
>
>
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20130111/29b71042/attachment.htm>


More information about the erlang-patches mailing list