aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src/prim_file.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-02-21 15:12:12 +0100
committerBjörn Gustavsson <[email protected]>2013-02-21 15:12:12 +0100
commit2c0ecc9a21b282b2b08c6594fa2d77dd0bd7aa00 (patch)
tree4e407b07b7bb1dd374578cba75c75888f95aaccf /erts/preloaded/src/prim_file.erl
parent348178af5a16329b2030604fa79bd3f9c1048ff0 (diff)
parent8370c974835f7b71cf1b12a44988168927475255 (diff)
downloadotp-2c0ecc9a21b282b2b08c6594fa2d77dd0bd7aa00.tar.gz
otp-2c0ecc9a21b282b2b08c6594fa2d77dd0bd7aa00.tar.bz2
otp-2c0ecc9a21b282b2b08c6594fa2d77dd0bd7aa00.zip
Merge branch 'pan/unicode_filename_warnings'
* pan/unicode_filename_warnings: prim_file: Fix error return from prim_file:list_dir/1
Diffstat (limited to 'erts/preloaded/src/prim_file.erl')
-rw-r--r--erts/preloaded/src/prim_file.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/erts/preloaded/src/prim_file.erl b/erts/preloaded/src/prim_file.erl
index b40a6d9633..489e8ca4ea 100644
--- a/erts/preloaded/src/prim_file.erl
+++ b/erts/preloaded/src/prim_file.erl
@@ -933,7 +933,12 @@ list_dir_int(Port, Dir) ->
fun(P) ->
case list_dir_response(P, []) of
{ok, RawNames} ->
- {ok, list_dir_convert(RawNames)};
+ try
+ {ok, list_dir_convert(RawNames)}
+ catch
+ throw:Reason ->
+ Reason
+ end;
Error ->
Error
end
@@ -979,7 +984,7 @@ list_dir_convert([Name|Names]) ->
{error, ignore} ->
list_dir_convert(Names);
{error, error} ->
- {error, {no_translation, Name}};
+ throw({error, {no_translation, Name}});
Converted when is_list(Converted) ->
[Converted|list_dir_convert(Names)]
end;