diff options
author | Lukas Larsson <lukas@erlang-solutions.com> | 2012-05-23 10:13:44 +0200 |
---|---|---|
committer | Lukas Larsson <lukas@erlang-solutions.com> | 2012-05-23 10:17:16 +0200 |
commit | f95a54ece96090c0b918d30205d13bcd4a015786 (patch) | |
tree | 50586ddb6b7f73b47960365dd8d046a90935c3e3 /lib/stdlib | |
parent | e4717301b73f2d7b2716b625e1b647b35d2815be (diff) | |
download | otp-f95a54ece96090c0b918d30205d13bcd4a015786.tar.gz otp-f95a54ece96090c0b918d30205d13bcd4a015786.tar.bz2 otp-f95a54ece96090c0b918d30205d13bcd4a015786.zip |
Fix infinite loop when an invalid drive letter it given
Diffstat (limited to 'lib/stdlib')
-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 |