diff options
Diffstat (limited to 'lib/snmp/src/agent/snmp_standard_mib.erl')
-rw-r--r-- | lib/snmp/src/agent/snmp_standard_mib.erl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/snmp/src/agent/snmp_standard_mib.erl b/lib/snmp/src/agent/snmp_standard_mib.erl index 7c78e03b3b..ca93546923 100644 --- a/lib/snmp/src/agent/snmp_standard_mib.erl +++ b/lib/snmp/src/agent/snmp_standard_mib.erl @@ -156,7 +156,7 @@ read_standard(Dir) -> Gen = fun(D, Reason) -> throw({error, {failed_reading_config_file, D, FileName, - file:list_dir(Dir), Reason}}) + list_dir(Dir), Reason}}) end, Filter = fun(Standard) -> sort_standard(Standard) end, Check = fun(Entry) -> check_standard(Entry) end, @@ -164,6 +164,14 @@ read_standard(Dir) -> snmp_conf:read_files(Dir, [{Gen, Filter, Check, FileName}]), Standard. +list_dir(Dir) -> + case file:list_dir(Dir) of + {ok, Files} -> + Files; + Error -> + Error + end. + %%----------------------------------------------------------------- %% Make sure that each mandatory standard attribute is present, and |