This is an automated email from the ASF dual-hosted git repository. ronny pushed a commit to branch fix-unbound-var in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 7cb5c05a6f6e817ea9a226d8c8cb048db42626d4 Author: Ronny Berndt <[email protected]> AuthorDate: Mon Dec 5 14:12:47 2022 +0100 Fix unbound variable warning While the variable is not really unbound in the case-statement, use a more up-to-date pattern for binding the value. --- src/couch/src/couch_server.erl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/couch/src/couch_server.erl b/src/couch/src/couch_server.erl index 9e5ab87d8..85e41c31e 100644 --- a/src/couch/src/couch_server.erl +++ b/src/couch/src/couch_server.erl @@ -416,10 +416,11 @@ all_databases(Fun, Acc0) -> true, fun(Filename, AccIn) -> NormFilename = couch_util:normpath(Filename), - case NormFilename -- NormRoot of - [$/ | RelativeFilename] -> ok; - RelativeFilename -> ok - end, + RelativeFilename = + case NormFilename -- NormRoot of + [$/ | Filename] -> Filename; + Filename -> Filename + end, Ext = filename:extension(RelativeFilename), case Fun(?l2b(filename:rootname(RelativeFilename, Ext)), AccIn) of {ok, NewAcc} -> NewAcc;
