Index: subversion/libsvn_wc/copy.c
===================================================================
--- subversion/libsvn_wc/copy.c	(revision 32410)
+++ subversion/libsvn_wc/copy.c	(working copy)
@@ -403,14 +403,13 @@
                              _("'%s' already exists and is in the way"),
                              svn_path_local_style(dst_path, pool));
 
-  /* Even if DST_PATH doesn't exist it may still be a versioned file; it
+  /* Even if DST_PATH doesn't exist it may still be a versioned item; it
      may be scheduled for deletion, or the user may simply have removed the
      working copy.  Since we are going to write to DST_PATH text-base and
      prop-base we need to detect such cases and abort. */
   SVN_ERR(svn_wc_entry(&dst_entry, dst_path, dst_parent, FALSE, pool));
-  if (dst_entry && dst_entry->kind == svn_node_file)
+  if (dst_entry && dst_entry->schedule != svn_wc_schedule_delete)
     {
-      if (dst_entry->schedule != svn_wc_schedule_delete)
         return svn_error_createf(SVN_ERR_ENTRY_EXISTS, NULL,
                                  _("There is already a versioned item '%s'"),
                                  svn_path_local_style(dst_path, pool));
Index: subversion/libsvn_client/copy.c
===================================================================
--- subversion/libsvn_client/copy.c	(revision 32410)
+++ subversion/libsvn_client/copy.c	(working copy)
@@ -2000,26 +2000,31 @@
         && (err->apr_err == SVN_ERR_ENTRY_EXISTS
             || err->apr_err == SVN_ERR_FS_ALREADY_EXISTS))
     {
-      const char *src_path = APR_ARRAY_IDX(sources, 0,
-                               svn_client_copy_source_t *)->path;
-      const char *src_basename;
+      svn_node_kind_t dst_kind;
+      SVN_ERR(svn_io_check_path(dst_path, &dst_kind, subpool));
+      if (dst_kind == svn_node_dir)
+        {
+          const char *src_path = 
+            APR_ARRAY_IDX(sources, 0, svn_client_copy_source_t *)->path;
+          const char *src_basename;
 
-      svn_error_clear(err);
-      svn_pool_clear(subpool);
+          svn_error_clear(err);
+          svn_pool_clear(subpool);
 
-      src_basename = svn_path_basename(src_path, subpool);
-      if (svn_path_is_url(src_path) && ! svn_path_is_url(dst_path))
-        src_basename = svn_path_uri_decode(src_basename, subpool);
+          src_basename = svn_path_basename(src_path, subpool);
+          if (svn_path_is_url(src_path) && ! svn_path_is_url(dst_path))
+            src_basename = svn_path_uri_decode(src_basename, subpool);
 
-      err = setup_copy(&commit_info,
-                       sources,
-                       svn_path_join(dst_path, src_basename, subpool),
-                       FALSE /* is_move */,
-                       TRUE /* force, set to avoid deletion check */,
-                       make_parents,
-                       revprop_table,
-                       ctx,
-                       subpool);
+          err = setup_copy(&commit_info,
+                           sources,
+                           svn_path_join(dst_path, src_basename, subpool),
+                           FALSE /* is_move */,
+                           TRUE /* force, set to avoid deletion check */,
+                           make_parents,
+                           revprop_table,
+                           ctx,
+                           subpool);
+        }
     }
 
   if (commit_info_p != NULL)
@@ -2159,22 +2164,27 @@
         && (err->apr_err == SVN_ERR_ENTRY_EXISTS
             || err->apr_err == SVN_ERR_FS_ALREADY_EXISTS))
     {
-      const char *src_path = APR_ARRAY_IDX(src_paths, 0, const char *);
-      const char *src_basename;
+      svn_node_kind_t dst_kind;
+      SVN_ERR(svn_io_check_path(dst_path, &dst_kind, subpool));
+      if (dst_kind == svn_node_dir)
+        {
+          const char *src_path = APR_ARRAY_IDX(src_paths, 0, const char *);
+          const char *src_basename;
 
-      svn_error_clear(err);
-      svn_pool_clear(subpool);
+          svn_error_clear(err);
+          svn_pool_clear(subpool);
 
-      src_basename = svn_path_basename(src_path, pool);
+          src_basename = svn_path_basename(src_path, pool);
 
-      err = setup_copy(&commit_info, sources,
-                       svn_path_join(dst_path, src_basename, pool),
-                       TRUE /* is_move */,
-                       force,
-                       make_parents,
-                       revprop_table,
-                       ctx,
-                       subpool);
+          err = setup_copy(&commit_info, sources,
+                           svn_path_join(dst_path, src_basename, pool),
+                           TRUE /* is_move */,
+                           force,
+                           make_parents,
+                           revprop_table,
+                           ctx,
+                           subpool);
+        }
     }
 
   if (commit_info_p != NULL)


