FreeBSD/contrib/subversion/subversion/libsvn_repos/repos.c
/* Check if @a path is the root of a repository by checking if the
 * path contains the expected files and directories.  Return TRUE
 * on errors (which would be permission errors, probably) so that
 * we the user will see them after we try to open the repository
 * for real.  */
Check if @a path is the root of a repository by checking if the
path contains the expected files and directories.  Return TRUE
on errors (which would be permission errors, probably) so that
we the user will see them after we try to open the repository
for real.
Check if @a path is the root of a repository by checking if the path contains the expected files and directories . Return TRUE on errors ( which would be permission errors probably ) so that we the user will see them after we try to open the repository for real .
static svn_boolean_t
check_repos_path(const char *path,
                 apr_pool_t *pool)
{
  svn_node_kind_t kind;
  svn_error_t *err;
  err = svn_io_check_path(svn_dirent_join(path, SVN_REPOS__FORMAT, pool),
                          &kind, pool);
  if (err)
    {
      svn_error_clear(err);
      return TRUE;
    }
  if (kind != svn_node_file)
    return FALSE;
  err = svn_io_check_resolved_path
    (svn_dirent_join(path, SVN_REPOS__DB_DIR, pool), &kind, pool);
  if (err)
    {
      svn_error_clear(err);
      return TRUE;
    }
  if (kind != svn_node_dir)
    return FALSE;
  return TRUE;
}
static svn_boolean_t check_repos_path ( const char * path , apr_pool_t * pool ) { svn_node_kind_t kind ; svn_error_t * err ; err = svn_io_check_path ( svn_dirent_join ( path , SVN_REPOS__FORMAT , pool ) , & kind , pool ) ; if ( err ) { svn_error_clear ( err ) ; return TRUE ; } if ( kind != svn_node_file ) return FALSE ; err = svn_io_check_resolved_path ( svn_dirent_join ( path , SVN_REPOS__DB_DIR , pool ) , & kind , pool ) ; if ( err ) { svn_error_clear ( err ) ; return TRUE ; } if ( kind != svn_node_dir ) return FALSE ; return TRUE ; }
Check if @a path is the root of a repository by checking if the
 path contains the expected files and directories.
Check if @a path is the root of a repository by checking if the path contains the expected files and directories .
/* Check the db/ subdir, but allow it to be a symlink (Subversion
     works just fine if it's a symlink). */