aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpulitta <[email protected]>2016-12-14 18:23:24 +0300
committerNatalia Pulina <[email protected]>2017-02-01 19:19:57 +0300
commitc02ea6ca5154f6f9f2fa4cc89ab70077df0dd66b (patch)
treeb30e4113c077bee5335159e67a6650f701fe66aa
parent3473ecd83a7bbe7e0bebb865f25dddb93e3bf10f (diff)
downloadotp-c02ea6ca5154f6f9f2fa4cc89ab70077df0dd66b.tar.gz
otp-c02ea6ca5154f6f9f2fa4cc89ab70077df0dd66b.tar.bz2
otp-c02ea6ca5154f6f9f2fa4cc89ab70077df0dd66b.zip
file: match enoent and enotdir in path_open
-rw-r--r--lib/kernel/src/file.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl
index 58b601e456..6d94f7770f 100644
--- a/lib/kernel/src/file.erl
+++ b/lib/kernel/src/file.erl
@@ -1413,7 +1413,7 @@ path_open_first([Path|Rest], Name, Mode, LastError) ->
case open(FileName, Mode) of
{ok, Fd} ->
{ok, Fd, FileName};
- {error, enoent} ->
+ {error, Reason} when Reason =:= enoent; Reason =:= enotdir ->
path_open_first(Rest, Name, Mode, LastError);
Error ->
Error