diff options
author | Björn Gustavsson <bjorn@erlang.org> | 2022-11-07 05:34:16 +0100 |
---|---|---|
committer | Björn Gustavsson <bjorn@erlang.org> | 2022-11-07 05:34:16 +0100 |
commit | c061907b1c3ed6c165c41443a37dbda5fc3cc9ac (patch) | |
tree | be1a6cc605061aad39dc9f2931f3d34f1c56bfa1 /lib/stdlib/test | |
parent | d0f071a9e634c6fdd6fea353a7d331fd31a517fb (diff) | |
parent | 706b555cf093252a3c4b833764cb79fb1fa6c65d (diff) | |
download | erlang-c061907b1c3ed6c165c41443a37dbda5fc3cc9ac.tar.gz |
Merge branch 'maint'
* maint:
compiler: Eliminate internal error in sub pass ssa_opt_bsm_shortcut
Eliminate Dialyzer crash for ill-typed code
compile_SUITE: Make core_roundtrip/1 less resource-intensive
compile_SUITE: Avoid eaccess error during cleanup on Windows
asn1, compiler: Avoid running out of memory on Windows
Fix filelib_SUITE:ensure_path_invalid_path/1
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r-- | lib/stdlib/test/filelib_SUITE.erl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/stdlib/test/filelib_SUITE.erl b/lib/stdlib/test/filelib_SUITE.erl index eac0dea4d8..179567f128 100644 --- a/lib/stdlib/test/filelib_SUITE.erl +++ b/lib/stdlib/test/filelib_SUITE.erl @@ -493,7 +493,16 @@ ensure_path_invalid_path(Config) when is_list(Config) -> FileName = filename:join(BaseDir, "foo"), ok = file:write_file(FileName, <<"eh?\n">>), Path = filename:join(FileName, "foo/bar/baz"), - {error,enotdir} = filelib:ensure_path(Path), + case filelib:ensure_path(Path) of + {error,enotdir} -> + ok; + {error,enoent} -> + %% The documentation has the following to say about the + %% `enotdir` error reason: + %% + %% "On some platforms, enoent is returned instead." + ok + end, false = filelib:is_dir(Path). ensure_path_relative_path(Config) when is_list(Config) -> |