aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-02-06 13:00:12 +0100
committerGitHub <[email protected]>2017-02-06 13:00:12 +0100
commitd2901a3e6826cfdc3eec47fc4786e7fcad2d42c5 (patch)
treeb3c210d93ec18f247eeec8f652233a57dfc15351
parent181d1c60def42e938dc3642cf798a73fa73d1425 (diff)
parentc02ea6ca5154f6f9f2fa4cc89ab70077df0dd66b (diff)
downloadotp-d2901a3e6826cfdc3eec47fc4786e7fcad2d42c5.tar.gz
otp-d2901a3e6826cfdc3eec47fc4786e7fcad2d42c5.tar.bz2
otp-d2901a3e6826cfdc3eec47fc4786e7fcad2d42c5.zip
Merge pull request #1283 from pulitta/maint
file: match enoent and enotdir in path_open OTP-14191
-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