diff options
author | Björn Gustavsson <[email protected]> | 2013-02-20 11:57:24 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-02-20 12:02:19 +0100 |
commit | 8370c974835f7b71cf1b12a44988168927475255 (patch) | |
tree | 73df9c6a4a873a1a24462b15d30c664bd9244677 /erts/preloaded | |
parent | bc95be2fcdf9ecf27398a6240f2148388ec649ab (diff) | |
download | otp-8370c974835f7b71cf1b12a44988168927475255.tar.gz otp-8370c974835f7b71cf1b12a44988168927475255.tar.bz2 otp-8370c974835f7b71cf1b12a44988168927475255.zip |
prim_file: Fix error return from prim_file:list_dir/1
When the run-time system was started with +fnue, the error tuple
indicating a non-translatable filename was added as a non-proper
list tail inside an {ok,Files} term.
Diffstat (limited to 'erts/preloaded')
-rw-r--r-- | erts/preloaded/ebin/prim_file.beam | bin | 44132 -> 44228 bytes | |||
-rw-r--r-- | erts/preloaded/src/prim_file.erl | 9 |
2 files changed, 7 insertions, 2 deletions
diff --git a/erts/preloaded/ebin/prim_file.beam b/erts/preloaded/ebin/prim_file.beam Binary files differindex b64fe522e8..360887de9d 100644 --- a/erts/preloaded/ebin/prim_file.beam +++ b/erts/preloaded/ebin/prim_file.beam 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; |