aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-05-29 17:30:26 +0200
committerFredrik Gustafsson <[email protected]>2013-05-29 17:30:26 +0200
commit0fc6481cc1459ceb3629bbc64a61684198974963 (patch)
treecc4fd81f9afad91d52b73cfea3540d7db1d3fcd3 /lib/stdlib/src
parenta825b75eda765f13823490418b489c56c38f65c7 (diff)
parent048a67e6f34df0180bc8d2d0aba7f3b36d234a21 (diff)
downloadotp-0fc6481cc1459ceb3629bbc64a61684198974963.tar.gz
otp-0fc6481cc1459ceb3629bbc64a61684198974963.tar.bz2
otp-0fc6481cc1459ceb3629bbc64a61684198974963.zip
Merge branch 'maint'
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/c.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/stdlib/src/c.erl b/lib/stdlib/src/c.erl
index 56d435d5d7..fb6b8c8661 100644
--- a/lib/stdlib/src/c.erl
+++ b/lib/stdlib/src/c.erl
@@ -713,8 +713,10 @@ ls(Dir) ->
case file:list_dir(Dir) of
{ok, Entries} ->
ls_print(sort(Entries));
- {error,_E} ->
- format("Invalid directory\n")
+ {error, enotdir} ->
+ ls_print([Dir]);
+ {error, Error} ->
+ format("~s\n", [file:format_error(Error)])
end.
ls_print([]) -> ok;