Repository: couchdb-fabric Updated Branches: refs/heads/master dc5cca804 -> ecaacfecf
Use couch_db:dbname_suffix in path_ends_with Replace couch_db:normalize_dbname with couch_db:dbname_suffix since the semantic of normalize_dbname has been changed. couch_db:normalize_dbname would return all components of the path with shard info removed from it. couch_db:dbname_suffix on the other hand would return the last component of the path. It would also ensure that shard's suffix is removed from the result. COUCHDB-2983 Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/14c15179 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/14c15179 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/14c15179 Branch: refs/heads/master Commit: 14c15179296d0c1934497ca4e8db42c4822fdd8f Parents: dc5cca8 Author: ILYA Khlopotov <iil...@ca.ibm.com> Authored: Fri Apr 8 10:18:42 2016 -0700 Committer: ILYA Khlopotov <iil...@ca.ibm.com> Committed: Tue Apr 19 14:45:40 2016 -0700 ---------------------------------------------------------------------- src/fabric_util.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/14c15179/src/fabric_util.erl ---------------------------------------------------------------------- diff --git a/src/fabric_util.erl b/src/fabric_util.erl index 55661d3..0256fb6 100644 --- a/src/fabric_util.erl +++ b/src/fabric_util.erl @@ -295,7 +295,7 @@ is_users_db(DbName) -> DbName == ConfigName orelse path_ends_with(DbName, <<"_users">>). path_ends_with(Path, Suffix) -> - Suffix == couch_db:normalize_dbname(Path). + Suffix =:= couch_db:dbname_suffix(Path). fake_db(Opts) -> UserCtx = couch_util:get_value(user_ctx, Opts, #user_ctx{}),