[erlang-patches] Correct ls/1 in c.erl
Mon May 20 10:28:30 CEST 2013
On Tue, May 14, 2013 at 3:53 PM, Bengt Kleberg
> New name for the patch since I had a momentary lapse of reason with git.
> This should include all the current suggestions.
> git fetch git://github.com/ebengt/otp.git correct_ls_file_v2
Your new version looks better, but I still see room for improvement.
If I try to list a non-existing file I get:
no such file or directoryok
It does not look pretty. There should be a new line
after the error message.
Also, attempting to list a non-existing file is not
tested in the test suite. I no that you cannot test
for the exact error message (it may be differently
worded on different platforms), but you can at least
make a smoke test so that the code will be covered.
Invalid directory or file
I find the error message confusing. What are
you trying to tell the user?
Why not simply print the file if it is not a
Björn Gustavsson, Erlang/OTP, Ericsson AB
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-patches