]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
yikes. put the preserve_metadata assignment *after* declarations.
authorJim Meyering <jim@meyering.net>
Sun, 21 Oct 2001 18:50:16 +0000 (18:50 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 21 Oct 2001 18:50:16 +0000 (18:50 +0000)
gcc-3.0 didn't complain.

src/copy.c

index 33e47418fa7137423d96f567ae0a81d4119aa588..1d61b1d365a93888922c273d99b63556b6ec84e5 100644 (file)
@@ -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'