Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make the --ignore-existing option not overwrite a regular file with
[rsync/rsync.git]
/
generator.c
diff --git
a/generator.c
b/generator.c
index
1b13d56
..
909c0f4
100644
(file)
--- a/
generator.c
+++ b/
generator.c
@@
-1358,6
+1358,13
@@
static void recv_generator(char *fname, struct file_struct *file, int ndx,
&& !am_root && sx.st.st_uid == our_uid)
del_opts |= DEL_NO_UID_WRITE;
&& !am_root && sx.st.st_uid == our_uid)
del_opts |= DEL_NO_UID_WRITE;
+ if (ignore_existing > 0 && statret == 0
+ && (!is_dir || !S_ISDIR(sx.st.st_mode))) {
+ if (verbose > 1 && is_dir >= 0)
+ rprintf(FINFO, "%s exists\n", fname);
+ goto cleanup;
+ }
+
if (is_dir) {
if (!implied_dirs && file->flags & FLAG_IMPLIED_DIR)
goto cleanup;
if (is_dir) {
if (!implied_dirs && file->flags & FLAG_IMPLIED_DIR)
goto cleanup;
@@
-1663,12
+1670,6
@@
static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto cleanup;
}
goto cleanup;
}
- if (ignore_existing > 0 && statret == 0) {
- if (verbose > 1)
- rprintf(FINFO, "%s exists\n", fname);
- goto cleanup;
- }
-
if (update_only > 0 && statret == 0
&& cmp_time(sx.st.st_mtime, file->modtime) > 0) {
if (verbose > 1)
if (update_only > 0 && statret == 0
&& cmp_time(sx.st.st_mtime, file->modtime) > 0) {
if (verbose > 1)
@@
-1856,7
+1857,7
@@
static void recv_generator(char *fname, struct file_struct *file, int ndx,
rprintf(FINFO, "generating and sending sums for %d\n", ndx);
notify_others:
rprintf(FINFO, "generating and sending sums for %d\n", ndx);
notify_others:
- if (remove_source_files && !delay_updates && !phase)
+ if (remove_source_files && !delay_updates && !phase
&& !dry_run
)
increment_active_files(ndx, itemizing, code);
if (inc_recurse && !dry_run)
cur_flist->in_progress++;
increment_active_files(ndx, itemizing, code);
if (inc_recurse && !dry_run)
cur_flist->in_progress++;
@@
-2080,7
+2081,7
@@
void generate_files(int f_out, const char *local_name)
need_retouch_dir_times = preserve_times > 1;
lull_mod = allowed_lull * 5;
symlink_timeset_failed_flags = ITEM_REPORT_TIME
need_retouch_dir_times = preserve_times > 1;
lull_mod = allowed_lull * 5;
symlink_timeset_failed_flags = ITEM_REPORT_TIME
-
| (protocol_version >= 30 ? ITEM_REPORT_TIMEFAIL : 0
);
+
| (protocol_version >= 30 || !am_server ? ITEM_REPORT_TIMEFAIL : 0
);
if (verbose > 2)
rprintf(FINFO, "generator starting pid=%ld\n", (long)getpid());
if (verbose > 2)
rprintf(FINFO, "generator starting pid=%ld\n", (long)getpid());