summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-10-21 18:50:16 +0000
committerJim Meyering <jim@meyering.net>2001-10-21 18:50:16 +0000
commite735c8f6e0ab5b42bea1145cc25ddd01dac65813 (patch)
treee91c750587e64be9c973cc590a405fe23b2eaf19 /src
parent7436273688aa72f46741d94b5f0f7e86c53e8130 (diff)
downloadcoreutils-e735c8f6e0ab5b42bea1145cc25ddd01dac65813.tar.xz
yikes. put the preserve_metadata assignment *after* declarations.
gcc-3.0 didn't complain.
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'