diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-09-13 12:12:26 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-09-13 12:12:26 +0000 |
commit | 615d4b2cc83fb7d976d3a88ffbae2a10ba201541 (patch) | |
tree | dfae68600ec57c928c4882a58ed5991e25e898d8 | |
parent | e6bcd96876db4fe6670a2b82e8d28af92f8e3acb (diff) | |
download | coreutils-615d4b2cc83fb7d976d3a88ffbae2a10ba201541.tar.xz |
Adjust to backup enum rename.
-rw-r--r-- | src/copy.c | 8 | ||||
-rw-r--r-- | src/cp.c | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/copy.c b/src/copy.c index 61c74c383..c2294ca82 100644 --- a/src/copy.c +++ b/src/copy.c @@ -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); @@ -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; |