aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--erts/preloaded/ebin/prim_file.beambin31588 -> 31528 bytes
-rw-r--r--erts/preloaded/src/prim_file.erl6
2 files changed, 3 insertions, 3 deletions
diff --git a/erts/preloaded/ebin/prim_file.beam b/erts/preloaded/ebin/prim_file.beam
index c2ae01d0d5..bfb1e48365 100644
--- a/erts/preloaded/ebin/prim_file.beam
+++ b/erts/preloaded/ebin/prim_file.beam
Binary files differ
diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl
index fb0aef8947..13e8e8fb5b 100644
--- a/erts/preloaded/src/prim_file.erl
+++ b/erts/preloaded/src/prim_file.erl
@@ -864,9 +864,9 @@ drv_command(Port, Command) ->
drv_command(Port, Command, R) when is_binary(Command) ->
drv_command(Port, Command, true, R);
drv_command(Port, Command, R) ->
- try erlang:iolist_to_binary(Command) of
- Bin ->
- drv_command(Port, Bin, true, R)
+ try erlang:iolist_size(Command) of
+ _ ->
+ drv_command(Port, Command, true, R)
catch
error:Reason ->
{error, Reason}