diff options
author | Lukas Larsson <[email protected]> | 2012-06-01 11:06:20 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2012-06-01 11:06:20 +0200 |
commit | 165a928d1cc9e1a326d1cd8532505b93e1a0d76e (patch) | |
tree | 50c9087cfd4205daa484e20eb493e8788516b851 /lib/stdlib/src | |
parent | 4c70878ddf1ef065e7e83395c96a7d9e9c4e27b0 (diff) | |
parent | bfe9bf0007b5babb6b72cf7bc2a23e7f5c131232 (diff) | |
download | otp-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/src')
-rw-r--r-- | lib/stdlib/src/filelib.erl | 3 |
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 |