You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ko...@apache.org on 2015/09/11 15:56:50 UTC
svn commit: r1702472 - /subversion/trunk/subversion/libsvn_client/mtcc.c
Author: kotkov
Date: Fri Sep 11 13:56:49 2015
New Revision: 1702472
URL: http://svn.apache.org/r1702472
Log:
Fixup mismatching errors in the svn_client__mtcc_check_path() implementation.
If mtcc has a file operation scheduled, but RA layer tells us that the actual
node is a directory, say that the node is not a file. Previously we would
say that the node is not a directory, and that's wrong, because it actually
is a directory. The same applies to scheduled directory operations, i.e.,
vice versa.
* subversion/libsvn_client/mtcc.c
(svn_client__mtcc_check_path): Swap the svn_error_createf() calls between
if and else-if clauses.
Modified:
subversion/trunk/subversion/libsvn_client/mtcc.c
Modified: subversion/trunk/subversion/libsvn_client/mtcc.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/mtcc.c?rev=1702472&r1=1702471&r2=1702472&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/mtcc.c (original)
+++ subversion/trunk/subversion/libsvn_client/mtcc.c Fri Sep 11 13:56:49 2015
@@ -976,9 +976,9 @@ svn_client__mtcc_check_path(svn_node_kin
if (op->kind == OP_OPEN_DIR || op->kind == OP_ADD_DIR)
op->performed_stat = TRUE;
else if (op->kind == OP_OPEN_FILE || op->kind == OP_ADD_FILE)
- return svn_error_createf(SVN_ERR_FS_NOT_DIRECTORY, NULL,
- _("Can't perform directory operation "
- "on '%s' as it is not a directory"),
+ return svn_error_createf(SVN_ERR_FS_NOT_FILE, NULL,
+ _("Can't perform file operation "
+ "on '%s' as it is not a file"),
relpath);
}
else if (op && *kind == svn_node_file)
@@ -986,9 +986,9 @@ svn_client__mtcc_check_path(svn_node_kin
if (op->kind == OP_OPEN_FILE || op->kind == OP_ADD_FILE)
op->performed_stat = TRUE;
else if (op->kind == OP_OPEN_DIR || op->kind == OP_ADD_DIR)
- return svn_error_createf(SVN_ERR_FS_NOT_FILE, NULL,
- _("Can't perform file operation "
- "on '%s' as it is not a file"),
+ return svn_error_createf(SVN_ERR_FS_NOT_DIRECTORY, NULL,
+ _("Can't perform directory operation "
+ "on '%s' as it is not a directory"),
relpath);
}
else if (op && (op->kind == OP_OPEN_DIR || op->kind == OP_OPEN_FILE))