aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-02-12 17:35:17 +0100
committerBjörn Gustavsson <[email protected]>2013-02-12 17:38:18 +0100
commit87fe90a69421b9fc462f94a6bf4b760f92fd49e0 (patch)
tree51019a54f4d6b76729147f168c32045ec8fc6238 /lib
parentcd08400f92ec7672025bf39a458effcf33a423dc (diff)
downloadotp-87fe90a69421b9fc462f94a6bf4b760f92fd49e0.tar.gz
otp-87fe90a69421b9fc462f94a6bf4b760f92fd49e0.tar.bz2
otp-87fe90a69421b9fc462f94a6bf4b760f92fd49e0.zip
c: Remove handling of binaries in return from file:list_dir/1
file:list_dir/1 will no longer return binaries.
Diffstat (limited to 'lib')
-rw-r--r--lib/stdlib/src/c.erl20
1 files changed, 2 insertions, 18 deletions
diff --git a/lib/stdlib/src/c.erl b/lib/stdlib/src/c.erl
index 535f2d5174..e31ae6b9ef 100644
--- a/lib/stdlib/src/c.erl
+++ b/lib/stdlib/src/c.erl
@@ -685,7 +685,7 @@ portformat(Name, Id, Cmd) ->
pwd() ->
case file:get_cwd() of
{ok, Str} ->
- ok = io:format("~ts\n", [fixup_one_bin(Str)]);
+ ok = io:format("~ts\n", [Str]);
{error, _} ->
ok = io:format("Cannot determine current directory\n")
end.
@@ -712,27 +712,11 @@ ls() ->
ls(Dir) ->
case file:list_dir(Dir) of
{ok, Entries} ->
- ls_print(sort(fixup_bin(Entries)));
+ ls_print(sort(Entries));
{error,_E} ->
format("Invalid directory\n")
end.
-fixup_one_bin(X) when is_binary(X) ->
- L = binary_to_list(X),
- [ if
- El > 127 ->
- $?;
- true ->
- El
- end || El <- L];
-fixup_one_bin(X) ->
- X.
-fixup_bin([H|T]) ->
- [fixup_one_bin(H) | fixup_bin(T)];
-fixup_bin([]) ->
- [].
-
-
ls_print([]) -> ok;
ls_print(L) ->
Width = min([max(lengths(L, [])), 40]) + 5,