big-r81 commented on code in PR #5114:
URL: https://github.com/apache/couchdb/pull/5114#discussion_r1665817724
##########
src/config/src/config.erl:
##########
@@ -455,6 +466,24 @@ read_ini_file(IniFile) ->
throw({startup_error, Msg})
end.
+get_write_file([_ | _] = IniFiles) ->
+ lists:last(IniFiles);
+get_write_file(_) ->
+ undefined.
+
+% Takes a list of files and directories with *.ini files, and expands
+% the directories inline with individual *.ini files
+expand_dirs(IniFilesDirs) ->
+ lists:flatmap(fun expand_dirs_fmap/1, IniFilesDirs).
+
+expand_dirs_fmap(File) ->
+ case filelib:is_dir(File) of
+ true ->
+ lists:sort(filelib:wildcard(File ++ "/*.ini"));
Review Comment:
@nickva ^^
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]