From 71e27c463d286ebf75a63533ad3701d79b9ba1d3 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 21 Jan 2005 00:34:37 +0000 Subject: [PATCH] - Changed XMIT_TOP_DIR to XMIT_DEL_START. - Changed FLAG_TOP_DIR to FLAG_DEL_START. --- flist.c | 14 +++++++------- receiver.c | 2 +- rsync.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/flist.c b/flist.c index 7e655820..58010dd8 100644 --- a/flist.c +++ b/flist.c @@ -422,11 +422,11 @@ void send_file_entry(struct file_struct *file, int f, unsigned short base_flags) /* We must make sure we don't send a zero flag byte or the * other end will terminate the flist transfer. Note that - * the use of XMIT_TOP_DIR on a non-dir has no meaning, so + * the use of XMIT_DEL_START on a non-dir has no meaning, so * it's harmless way to add a bit to the first flag byte. */ if (protocol_version >= 28) { if (!flags && !S_ISDIR(mode)) - flags |= XMIT_TOP_DIR; + flags |= XMIT_DEL_START; if ((flags & 0xFF00) || !flags) { flags |= XMIT_EXTENDED_FLAGS; write_byte(f, flags); @@ -435,7 +435,7 @@ void send_file_entry(struct file_struct *file, int f, unsigned short base_flags) write_byte(f, flags); } else { if (!(flags & 0xFF) && !S_ISDIR(mode)) - flags |= XMIT_TOP_DIR; + flags |= XMIT_DEL_START; if (!(flags & 0xFF)) flags |= XMIT_LONG_NAME; write_byte(f, flags); @@ -645,7 +645,7 @@ void receive_file_entry(struct file_struct **fptr, unsigned short flags, memset(bp, 0, file_struct_len); bp += file_struct_len; - file->flags = flags & XMIT_TOP_DIR ? FLAG_TOP_DIR : 0; + file->flags = flags & XMIT_DEL_START ? FLAG_DEL_START : 0; file->modtime = modtime; file->length = file_length; file->mode = mode; @@ -1212,7 +1212,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) if (one_file_system) set_filesystem(fname); - send_file_name(f, flist, fname, recurse, XMIT_TOP_DIR); + send_file_name(f, flist, fname, recurse, XMIT_DEL_START); if (olddir[0]) { flist_dir = NULL; @@ -1475,8 +1475,8 @@ static void clean_flist(struct file_list *flist, int strip_root, int no_dups) /* Make sure that if we unduplicate '.', that we don't * lose track of a user-specified starting point (or * else deletions will mysteriously fail with -R). */ - if (flist->files[i]->flags & FLAG_TOP_DIR) - flist->files[prev_i]->flags |= FLAG_TOP_DIR; + if (flist->files[i]->flags & FLAG_DEL_START) + flist->files[prev_i]->flags |= FLAG_DEL_START; clear_file(i, flist); } else diff --git a/receiver.c b/receiver.c index c9a3c8a1..bb3097a7 100644 --- a/receiver.c +++ b/receiver.c @@ -82,7 +82,7 @@ void delete_files(struct file_list *flist) } for (j = 0; j < flist->count; j++) { - if (!(flist->files[j]->flags & FLAG_TOP_DIR) + if (!(flist->files[j]->flags & FLAG_DEL_START) || !S_ISDIR(flist->files[j]->mode)) continue; diff --git a/rsync.h b/rsync.h index ab3e8200..cdb9b2a7 100644 --- a/rsync.h +++ b/rsync.h @@ -41,7 +41,7 @@ /* These flags are only used during the flist transfer. */ -#define XMIT_TOP_DIR (1<<0) +#define XMIT_DEL_START (1<<0) #define XMIT_SAME_MODE (1<<1) #define XMIT_EXTENDED_FLAGS (1<<2) #define XMIT_SAME_RDEV_pre28 XMIT_EXTENDED_FLAGS /* Only in protocols < 28 */ @@ -57,7 +57,7 @@ /* These flags are used in the live flist data. */ -#define FLAG_TOP_DIR (1<<0) +#define FLAG_DEL_START (1<<0) #define FLAG_HLINK_EOL (1<<1) /* generator only */ #define FLAG_MOUNT_POINT (1<<2) /* sender only */ -- 2.34.1