]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* src/copy.c (copy_internal): Add comments.
authorJim Meyering <jim@meyering.net>
Sun, 27 Aug 2006 16:20:52 +0000 (16:20 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 27 Aug 2006 16:20:52 +0000 (16:20 +0000)
ChangeLog
src/copy.c

index 9d7970d6bd0e9c042fe5ee1128ba260a5f43f14a..2f461cf9536339ef95ba0808b79fd3ed7877ae4d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-08-27  Jim Meyering  <jim@meyering.net>
+
+       * src/copy.c (copy_internal): Add comments.
+
 2006-08-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        * src/Makefile.am (AM_CPPFLAGS): Remove -I$(srcdir) and -I../lib,
index 9ca2ae9df07afe7bb47beb44327fa737520f61e3..70886b33807e24518b1f8ea5c89de5ea24488fa8 100644 (file)
@@ -1033,7 +1033,8 @@ copy_internal (char const *src_name, char const *dst_name,
            }
        }
       else
-       {
+       { /* Here, we know that dst_name exists, at least to the point
+            that it is XSTAT'able.  */
          bool return_now;
          bool unlink_src;
          bool ok = same_file_ok (src_name, &src_sb, dst_name, &dst_sb,
@@ -1067,6 +1068,8 @@ copy_internal (char const *src_name, char const *dst_name,
                {
                  if (x->move_mode && x->backup_type != no_backups)
                    {
+                     /* Moving/copying a directory onto an existing
+                        non-directory is ok only with --backup.  */
                    }
                  else
                    {
@@ -1101,6 +1104,8 @@ copy_internal (char const *src_name, char const *dst_name,
                {
                  if (x->move_mode && x->backup_type != no_backups)
                    {
+                     /* Moving/copying a non-directory onto an existing
+                        directory is ok only with --backup.  */
                    }
                  else
                    {