aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2012-06-01 11:06:20 +0200
committerLukas Larsson <[email protected]>2012-06-01 11:06:20 +0200
commit165a928d1cc9e1a326d1cd8532505b93e1a0d76e (patch)
tree50c9087cfd4205daa484e20eb493e8788516b851 /lib/stdlib
parent4c70878ddf1ef065e7e83395c96a7d9e9c4e27b0 (diff)
parentbfe9bf0007b5babb6b72cf7bc2a23e7f5c131232 (diff)
downloadotp-165a928d1cc9e1a326d1cd8532505b93e1a0d76e.tar.gz
otp-165a928d1cc9e1a326d1cd8532505b93e1a0d76e.tar.bz2
otp-165a928d1cc9e1a326d1cd8532505b93e1a0d76e.zip
Merge branch 'maint'
* maint: Fix infinite loop when an invalid drive letter it given
Diffstat (limited to 'lib/stdlib')
-rw-r--r--lib/stdlib/src/filelib.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/stdlib/src/filelib.erl b/lib/stdlib/src/filelib.erl
index d532cea187..b098d4cb91 100644
--- a/lib/stdlib/src/filelib.erl
+++ b/lib/stdlib/src/filelib.erl
@@ -264,6 +264,9 @@ ensure_dir(F) ->
case do_is_dir(Dir, file) of
true ->
ok;
+ false when Dir =:= F ->
+ %% Protect against infinite loop
+ {error,einval};
false ->
ensure_dir(Dir),
case file:make_dir(Dir) of