summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/copy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/copy.c b/src/copy.c
index 33e47418f..1d61b1d36 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -1278,7 +1278,6 @@ copy_internal (const char *src_path, const char *dst_path,
#ifdef S_ISLNK
if (S_ISLNK (src_type))
{
- preserve_metadata = 0;
char *src_link_val = xreadlink (src_path);
if (src_link_val == NULL)
{
@@ -1313,6 +1312,9 @@ copy_internal (const char *src_path, const char *dst_path,
}
}
+ /* There's no need to preserve timestamps or permissions. */
+ preserve_metadata = 0;
+
if (x->preserve_ownership)
{
/* Preserve the owner and group of the just-`copied'