diff options
Diffstat (limited to 'subversion/libsvn_ra_local')
-rw-r--r-- | subversion/libsvn_ra_local/ra_plugin.c | 5 | ||||
-rw-r--r-- | subversion/libsvn_ra_local/split_url.c | 14 |
2 files changed, 14 insertions, 5 deletions
diff --git a/subversion/libsvn_ra_local/ra_plugin.c b/subversion/libsvn_ra_local/ra_plugin.c index e7e8021..4ccc86d 100644 --- a/subversion/libsvn_ra_local/ra_plugin.c +++ b/subversion/libsvn_ra_local/ra_plugin.c @@ -41,6 +41,7 @@ #include "private/svn_repos_private.h" #include "private/svn_fspath.h" #include "private/svn_atomic.h" +#include "private/svn_subr_private.h" #define APR_WANT_STRFUNC #include <apr_want.h> @@ -502,7 +503,7 @@ apply_lock_tokens(svn_fs_t *fs, N_("Module for accessing a repository on local disk.") static const char * -svn_ra_local__get_description(void) +svn_ra_local__get_description(apr_pool_t *pool) { return _(RA_LOCAL_DESCRIPTION); } @@ -1745,7 +1746,7 @@ svn_ra_local__init(const svn_version_t *loader_version, "ra_local"), loader_version->major); - SVN_ERR(svn_ver_check_list(ra_local_version(), checklist)); + SVN_ERR(svn_ver_check_list2(ra_local_version(), checklist, svn_ver_equal)); #ifndef SVN_LIBSVN_CLIENT_LINKS_RA_LOCAL /* This assumes that POOL was the pool used to load the dso. */ diff --git a/subversion/libsvn_ra_local/split_url.c b/subversion/libsvn_ra_local/split_url.c index d08bb26..ec6cb68 100644 --- a/subversion/libsvn_ra_local/split_url.c +++ b/subversion/libsvn_ra_local/split_url.c @@ -39,6 +39,7 @@ svn_ra_local__split_URL(svn_repos_t **repos, const char *repos_dirent; const char *repos_root_dirent; svn_stringbuf_t *urlbuf; + apr_size_t root_end; SVN_ERR(svn_uri_get_dirent_from_file_url(&repos_dirent, URL, pool)); @@ -65,10 +66,17 @@ svn_ra_local__split_URL(svn_repos_t **repos, "/", svn_dirent_skip_ancestor(repos_root_dirent, repos_dirent), (const char *)NULL); */ - *fs_path = &repos_dirent[strlen(repos_root_dirent)]; - - if (**fs_path == '\0') + root_end = strlen(repos_root_dirent); + if (! repos_dirent[root_end]) *fs_path = "/"; + else if (repos_dirent[root_end] == '/') + *fs_path = &repos_dirent[root_end]; + else + { + /* On Windows "C:/" is the parent directory of "C:/dir" */ + *fs_path = &repos_dirent[root_end-1]; + SVN_ERR_ASSERT((*fs_path)[0] == '/'); + } /* Remove the path components after the root dirent from the original URL, to get a URL to the repository root. |