summaryrefslogtreecommitdiff
path: root/subversion/libsvn_client/copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/libsvn_client/copy.c')
-rw-r--r--subversion/libsvn_client/copy.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/subversion/libsvn_client/copy.c b/subversion/libsvn_client/copy.c
index 12bbfe6cf6870..af6a75b836985 100644
--- a/subversion/libsvn_client/copy.c
+++ b/subversion/libsvn_client/copy.c
@@ -1057,10 +1057,24 @@ verify_wc_dsts(const apr_array_header_t *copy_pairs,
ctx->wc_ctx, pair->dst_parent_abspath,
FALSE, TRUE,
iterpool));
- if (make_parents && dst_parent_kind == svn_node_none)
+ if (dst_parent_kind == svn_node_none)
{
- SVN_ERR(svn_client__make_local_parents(pair->dst_parent_abspath,
- TRUE, ctx, iterpool));
+ if (make_parents)
+ SVN_ERR(svn_client__make_local_parents(pair->dst_parent_abspath,
+ TRUE, ctx, iterpool));
+ else
+ {
+ SVN_ERR(svn_io_check_path(pair->dst_parent_abspath,
+ &dst_parent_kind, scratch_pool));
+ return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
+ (dst_parent_kind == svn_node_dir)
+ ? _("Directory '%s' is not under "
+ "version control")
+ : _("Path '%s' is not a directory"),
+ svn_dirent_local_style(
+ pair->dst_parent_abspath,
+ scratch_pool));
+ }
}
else if (dst_parent_kind != svn_node_dir)
{