Author: hwright
Date: Mon Jun 11 13:54:56 2012
New Revision: 1348847
URL: http://svn.apache.org/viewvc?rev=1348847&view=rev
Log:
Don't reinvent the wheel.
* subversion/libsvn_repos/replay.c
(is_within_base_path): Reimpliment using existing APIs.
Modified:
subversion/trunk/subversion/libsvn_repos/replay.c
Modified: subversion/trunk/subversion/libsvn_repos/replay.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/replay.c?rev=1348847&r1=1348846&r2=1348847&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/replay.c (original)
+++ subversion/trunk/subversion/libsvn_repos/replay.c Mon Jun 11 13:54:56 2012
@@ -343,14 +343,7 @@ static svn_boolean_t
is_within_base_path(const char *path, const char *base_path,
apr_ssize_t base_len)
{
- if (base_path[0] == '\0')
- return TRUE;
-
- if (strncmp(base_path, path, base_len) == 0
- && (path[base_len] == '/' || path[base_len] == '\0'))
- return TRUE;
-
- return FALSE;
+ return svn_relpath_skip_ancestor(base_path, path) != NULL;
}
/* Given PATH deleted under ROOT, return in READABLE whether the path was