Skip to content

Commit cf3a500

Browse files
authored
Do not error when File.rm_rf is called on unix domain socket on windows (#13471)
1 parent 2ea79fb commit cf3a500

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/elixir/lib/file.ex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,11 @@ defmodule File do
13631363
{:ok, _} ->
13641364
{:ok, :regular}
13651365

1366+
{:error, :eio} when major == :win32 ->
1367+
# unix domain socket returns `{:error, :eio}`
1368+
# on other platforms the result is `{:ok, :regular}`
1369+
{:ok, :regular}
1370+
13661371
{:error, reason} ->
13671372
{:error, reason}
13681373
end

0 commit comments

Comments
 (0)