You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2022/08/16 07:14:29 UTC
[couchdb-config] branch main updated: Remove leading/trailing whitespaces in config values (#40)
This is an automated email from the ASF dual-hosted git repository.
ronny pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-config.git
The following commit(s) were added to refs/heads/main by this push:
new 6be6887 Remove leading/trailing whitespaces in config values (#40)
6be6887 is described below
commit 6be6887f031814be260f9724cd8b3dc101ae31ae
Author: Ronny <ro...@apache.org>
AuthorDate: Tue Aug 16 09:14:25 2022 +0200
Remove leading/trailing whitespaces in config values (#40)
---
src/config.erl | 3 ++-
src/config_util.erl | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/config.erl b/src/config.erl
index b87ff34..cebcf57 100644
--- a/src/config.erl
+++ b/src/config.erl
@@ -437,8 +437,9 @@ parse_ini_file(IniFile) ->
ets:delete(?MODULE, {AccSectionName, ValueName}),
{AccSectionName, AccValues};
[LineValue | _Rest] ->
+ LineValueWithoutLeadTrailWS = string:trim(LineValue),
{AccSectionName,
- [{{AccSectionName, ValueName}, LineValue} | AccValues]}
+ [{{AccSectionName, ValueName}, LineValueWithoutLeadTrailWS} | AccValues]}
end
end
end
diff --git a/src/config_util.erl b/src/config_util.erl
index d0f9ed4..bce22ab 100644
--- a/src/config_util.erl
+++ b/src/config_util.erl
@@ -72,3 +72,4 @@ fix_path_list(["."|Rest], Acc) ->
fix_path_list(Rest, Acc);
fix_path_list([Dir | Rest], Acc) ->
fix_path_list(Rest, [Dir | Acc]).
+