diff options
author | Lars Thorsen <[email protected]> | 2016-09-07 14:03:50 +0200 |
---|---|---|
committer | Lars Thorsen <[email protected]> | 2016-09-07 14:03:50 +0200 |
commit | 04e8e3716a02c262e2569c94c4dba67d1782a1e9 (patch) | |
tree | bd596511bd2d96e211ffd2d2a1cdf71920a6c125 /lib/snmp/src/compile/snmpc.erl | |
parent | 68c748c3f7e75f8fa5e583e5cb979490258eb5f3 (diff) | |
parent | cda114d8186af91f4fa18c5e549c85ffa3b5ea55 (diff) | |
download | otp-04e8e3716a02c262e2569c94c4dba67d1782a1e9.tar.gz otp-04e8e3716a02c262e2569c94c4dba67d1782a1e9.tar.bz2 otp-04e8e3716a02c262e2569c94c4dba67d1782a1e9.zip |
Merge branch 'lars/utf-8-path-bugs/ERL-179/OTP-13718' into maint
* lars/utf-8-path-bugs/ERL-179/OTP-13718:
[snmp] Correct bug when path to mib contains UTF-8 characters
[ic] Fix but when UTF-8 character in path to idl spec
Diffstat (limited to 'lib/snmp/src/compile/snmpc.erl')
-rw-r--r-- | lib/snmp/src/compile/snmpc.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/snmp/src/compile/snmpc.erl b/lib/snmp/src/compile/snmpc.erl index db1f9ee61b..d86692aaf6 100644 --- a/lib/snmp/src/compile/snmpc.erl +++ b/lib/snmp/src/compile/snmpc.erl @@ -64,7 +64,7 @@ compile(Input, _Output, Options) -> {ok, _} -> ok; {error, Reason} -> - io:format("~p", [Reason]), + io:format("~tp", [Reason]), error end. @@ -126,7 +126,14 @@ compile(FileName) -> %%---------------------------------------------------------------------- compile(FileName, Options) when is_list(FileName) -> - true = snmpc_misc:is_string(FileName), + case snmpc_misc:check_file(FileName) of + true -> + compile_1(FileName, Options); + false -> + {error, {invalid_file, FileName}} + end. + +compile_1(FileName, Options) -> DefOpts = [{deprecated, true}, {group_check, true}, {i, ["./"]}, |