subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1481632 - /subversion/trunk/subversion/libsvn_repos/commit.c
Date Sun, 12 May 2013 19:39:44 GMT
Author: stsp
Date: Sun May 12 19:39:43 2013
New Revision: 1481632

URL: http://svn.apache.org/r1481632
Log:
Remove another redundant function definition in libsvn_repos.

* subversion/libsvn_repos/commit.c
  (check_valid_path): Remove. Was identical to svn_path_check_valid().
  (add_file_or_directory): Update caller, use svn_path_check_valid().

Modified:
    subversion/trunk/subversion/libsvn_repos/commit.c

Modified: subversion/trunk/subversion/libsvn_repos/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/commit.c?rev=1481632&r1=1481631&r2=1481632&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/commit.c (original)
+++ subversion/trunk/subversion/libsvn_repos/commit.c Sun May 12 19:39:43 2013
@@ -259,24 +259,6 @@ make_dir_baton(struct edit_baton *edit_b
   return db;
 }
 
-/* Reject paths which contain control characters (related to issue #4340). */
-static svn_error_t *
-check_valid_path(const char *path,
-                 apr_pool_t *pool)
-{
-  const char *c;
-
-  for (c = path; *c; c++)
-    {
-      if (svn_ctype_iscntrl(*c))
-        return svn_error_createf(SVN_ERR_FS_PATH_SYNTAX, NULL,
-           _("Invalid control character '0x%02x' in path '%s'"),
-           (unsigned char)*c, svn_path_illegal_path_escape(path, pool));
-    }
-
-  return SVN_NO_ERROR;
-}
-
 /* This function is the shared guts of add_file() and add_directory(),
    which see for the meanings of the parameters.  The only extra
    parameter here is IS_DIR, which is TRUE when adding a directory,
@@ -296,7 +278,8 @@ add_file_or_directory(const char *path,
   svn_boolean_t was_copied = FALSE;
   const char *full_path;
 
-  SVN_ERR(check_valid_path(path, pool));
+  /* Reject paths which contain control characters (related to issue #4340). */
+  SVN_ERR(svn_path_check_valid(path, pool));
 
   full_path = svn_fspath__join(eb->base_path,
                                svn_relpath_canonicalize(path, pool), pool);



Mime
View raw message