summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cp.c b/src/cp.c
index 2e34f7eca..718d059a8 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -594,7 +594,7 @@ copy (src_path, dst_path, new_dst, device, ancestors)
if (S_ISDIR (dst_sb.st_mode))
{
/* Temporarily change mode to allow overwriting. */
- if (eaccess_stat (&dst_sb, W_OK | X_OK) != 0)
+ if (eaccess_stat (&dst_sb, W_OK | X_OK, dst_path) != 0)
{
if (chmod (dst_path, 0700))
{