Adjust to backup enum rename.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Sep 2004 12:12:26 +0000 (12:12 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 13 Sep 2004 12:12:26 +0000 (12:12 +0000)
src/copy.c
src/cp.c

index 61c74c3..c2294ca 100644 (file)
@@ -507,7 +507,7 @@ same_file_ok (const char *src_path, const struct stat *src_sb,
      source and destination are the same directory entry.  In that
      case, moving the destination file aside (in making the backup)
      would also rename the source file and result in an error.  */
-  if (x->backup_type != none)
+  if (x->backup_type != no_backups)
     {
       if (!same_link)
        {
@@ -854,7 +854,7 @@ copy_internal (const char *src_path, const char *dst_path,
   if (command_line_arg)
     {
       if ( ! S_ISDIR (src_sb.st_mode)
-          && x->backup_type == none
+          && x->backup_type == no_backups
           && seen_file (x->src_info, src_path, &src_sb))
        {
          error (0, 0, _("warning: source file %s specified more than once"),
@@ -925,7 +925,7 @@ copy_internal (const char *src_path, const char *dst_path,
                 a move using cp and rm.
                 Note that it works fine if you use --backup=numbered.  */
              if (command_line_arg
-                 && x->backup_type != numbered
+                 && x->backup_type != numbered_backups
                  && seen_file (x->dest_info, dst_path, &dst_sb))
                {
                  error (0, 0,
@@ -1028,7 +1028,7 @@ copy_internal (const char *src_path, const char *dst_path,
                }
            }
 
-         if (x->backup_type != none && !S_ISDIR (dst_sb.st_mode))
+         if (x->backup_type != no_backups && !S_ISDIR (dst_sb.st_mode))
            {
              char *tmp_backup = find_backup_file_name (dst_path,
                                                        x->backup_type);
index 8b4e39f..46a0b0c 100644 (file)
--- a/src/cp.c
+++ b/src/cp.c
@@ -648,20 +648,20 @@ do_copy (int n_files, char **file, const char *target_directory,
         where SUFFIX is determined by any version control options used.  */
 
       if (x->unlink_dest_after_failed_open
-         && x->backup_type != none
+         && x->backup_type != no_backups
          && STREQ (source, dest)
          && !new_dst && S_ISREG (sb.st_mode))
        {
          static struct cp_options x_tmp;
 
          new_dest = find_backup_file_name (dest, x->backup_type);
-         /* Set x->backup_type to `none' so that the normal backup
+         /* Set x->backup_type to `no_backups' so that the normal backup
             mechanism is not used when performing the actual copy.
-            backup_type must be set to `none' only *after* the above
+            backup_type must be set to `no_backups' only *after* the above
             call to find_backup_file_name -- that function uses
             backup_type to determine the suffix it applies.  */
          x_tmp = *x;
-         x_tmp.backup_type = none;
+         x_tmp.backup_type = no_backups;
          x = &x_tmp;
        }
       else
@@ -999,7 +999,7 @@ main (int argc, char **argv)
   x.backup_type = (make_backups
                   ? xget_version (_("backup type"),
                                   version_control_string)
-                  : none);
+                  : no_backups);
 
   if (x.preserve_mode)
     x.umask_kill = ~ (mode_t) 0;