Skip to content

Commit b5d4046

Browse files
authored
Merge pull request erlware#193 from i-am-orestis/fix-resolution-of-tmp-dir-on-windows
Fix issue on windows with Erlang/OTP 28 which causes temporary directories to get created at the wrong path.
2 parents 6cff2a5 + 7075a71 commit b5d4046

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ec_file.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,13 +324,13 @@ remove_recursive(Path, Options) ->
324324

325325
-spec tmp() -> file:name().
326326
tmp() ->
327-
case erlang:system_info(system_architecture) of
328-
"win32" ->
327+
case os:type() of
328+
{win32, _} ->
329329
case os:getenv("TEMP") of
330330
false -> "./tmp";
331331
Val -> Val
332332
end;
333-
_SysArch ->
333+
_ ->
334334
case os:getenv("TMPDIR") of
335335
false -> "/tmp";
336336
Val -> Val

0 commit comments

Comments
 (0)