[prev in list] [next in list] [prev in thread] [next in thread] 

List:       subversion-commits
Subject:    svn commit: r1767196 - /subversion/trunk/subversion/libsvn_repos/list.c
From:       stefan2 () apache ! org
Date:       2016-10-30 23:19:48
Message-ID: 20161030231948.CE5EB3A0222 () svn01-us-west ! apache ! org
[Download RAW message or body]

Author: stefan2
Date: Sun Oct 30 23:19:48 2016
New Revision: 1767196

URL: http://svn.apache.org/viewvc?rev=1767196&view=rev
Log:
Make ra_local tests pass again:
Handle edge and error cases for list the same as in the client-only code.

* subversion/libsvn_repos/list.c
  (svn_repos_list):  Allow 'list' for file nodes and use the same error
                     code for nodes that are neither file nor directory.         

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

Modified: subversion/trunk/subversion/libsvn_repos/list.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/list.c?rev=1767196&r1=1767195&r2=1767196&view=diff
 ==============================================================================
--- subversion/trunk/subversion/libsvn_repos/list.c (original)
+++ subversion/trunk/subversion/libsvn_repos/list.c Sun Oct 30 23:19:48 2016
@@ -301,9 +301,16 @@ svn_repos_list(svn_fs_root_t *root,
    * Note that we must do this after the authz check to not indirectly
    * confirm the existence of PATH. */
   SVN_ERR(svn_fs_check_path(&kind, root, path, scratch_pool));
-  if (kind != svn_node_dir)
-    return svn_error_createf(SVN_ERR_FS_NOT_DIRECTORY, NULL,
-                             "There is no directory '%s'", path);
+  if (kind == svn_node_file)
+    {
+      /* There is no recursion on files. */
+      depth = svn_depth_empty;
+    }
+  else if (kind != svn_node_dir)
+    {
+      return svn_error_createf(SVN_ERR_FS_NOT_FOUND, NULL,
+                               _("Path '%s' not found"), path);
+    }
 
   /* Actually report PATH, if it passes the filters. */
   if (matches_any(svn_dirent_dirname(path, scratch_pool), patterns))


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic