Ensure that setting advanced config on broken path does not cause an error

This commit is contained in:
Andrew J. Stone 2015-02-10 22:19:06 -05:00
parent 92001ba40a
commit d7168f47e6

View File

@ -185,13 +185,15 @@ set_advanced_conf(DevPath, NameValuePairs) ->
Confs ->
Confs
end,
lager:info("AdvancedConfs = ~p~n", [AdvancedConfs]),
[update_app_config_file(RiakConf, NameValuePairs) || RiakConf <- AdvancedConfs],
ok.
make_advanced_confs(DevPath) ->
case filelib:is_dir(DevPath) of
false ->
lager:debug("Failed generating advanced.conf ~p is not a directory.", [DevPath]);
lager:error("Failed generating advanced.conf ~p is not a directory.", [DevPath]),
[];
true ->
Wildcard = io_lib:format("~s/dev/dev*/etc", [DevPath]),
ConfDirs = filelib:wildcard(Wildcard),