[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1617148 - /subversion/branches/authzperf/subversion/libsvn_repos/authz.c

From: Branko Čibej <brane_at_wandisco.com>
Date: Mon, 11 Aug 2014 02:04:32 +0200

On 10.08.2014 21:17, stefan2_at_apache.org wrote:
> Author: stefan2
> Date: Sun Aug 10 19:17:53 2014
> New Revision: 1617148
[...]
> @@ -973,7 +869,11 @@ add_complex_matches(lookup_state_t *stat
> for (i = 0; i < patterns->nelts; ++i)
> {
> node_t *node = APR_ARRAY_IDX(patterns, i, node_t *);
> - if (match_pattern(segment->data, node->segment.data))
> +
> + /* There should be not slashes and periods should be treated as
> + * literals. */
> + if (APR_SUCCESS == apr_fnmatch(node->segment.data, segment->data,
> + APR_FNM_PATHNAME | APR_FNM_PERIOD))
> add_next_node(state, node);

I assume there's no way to get slashes in a segment in any case, right?
So APR_FNM_PATHNAME is redundant. I wonder however why you think that we
need APR_FNM_PERIOD?

Oh, and BTW: please don't compare to APR_SUCCESS. We don't use that to
check the results of strcmp, either.

-- Brane

-- 
Branko Čibej | Director of Subversion
WANdisco | Realising the impossibilities of Big Data
e. brane_at_wandisco.com
Received on 2014-08-11 02:04:42 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.