[SCM] The rsync repository. - branch master updated

Rsync CVS commit messages rsync-cvs at lists.samba.org
Sun Apr 20 22:46:20 MDT 2014


The branch, master has been updated
       via  adc600c Check F_IS_ACTIVE() in a few more spots.
      from  43d6d0c Change args to file_checksum() to prepare for future changes.

;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit adc600cbe21bdabc3cfd5e7a01d54390ebd885cb
Author: Wayne Davison <wayned at samba.org>
Date:   Sun Apr 20 14:35:55 2014 -0700

    Check F_IS_ACTIVE() in a few more spots.
    
    The code needs to ignore flist entries that were marked inactive (by
    either duplicate removal or empty-dir pruning) in a few more spots.

-----------------------------------------------------------------------

Summary of changes:
 generator.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/generator.c b/generator.c
index cd7205e..53e9fbe 100644
--- a/generator.c
+++ b/generator.c
@@ -356,6 +356,9 @@ static void do_delete_pass(void)
 	for (j = 0; j < cur_flist->used; j++) {
 		struct file_struct *file = cur_flist->sorted[j];
 
+		if (!F_IS_ACTIVE(file))
+			continue;
+
 		f_name(file, fbuf);
 
 		if (!(file->flags & FLAG_CONTENT_DIR)) {
@@ -753,6 +756,9 @@ static struct file_struct *find_fuzzy(struct file_struct *file, struct file_list
 		for (j = 0; j < dirlist->used; j++) {
 			struct file_struct *fp = dirlist->files[j];
 
+			if (!F_IS_ACTIVE(fp))
+				continue;
+
 			if (!S_ISREG(fp->mode) || !F_LENGTH(fp) || fp->flags & FLAG_FILE_SENT)
 				continue;
 
@@ -778,6 +784,9 @@ static struct file_struct *find_fuzzy(struct file_struct *file, struct file_list
 			int len, suf_len;
 			uint32 dist;
 
+			if (!F_IS_ACTIVE(fp))
+				continue;
+
 			if (!S_ISREG(fp->mode) || !F_LENGTH(fp) || fp->flags & FLAG_FILE_SENT)
 				continue;
 
@@ -2016,6 +2025,8 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
 	 * transfer and/or re-set any tweaked modified-time values. */
 	for (i = start; i <= end; i++, counter++) {
 		file = flist->files[i];
+		if (!F_IS_ACTIVE(file))
+			continue;
 		if (!S_ISDIR(file->mode)
 		 || (!implied_dirs && file->flags & FLAG_IMPLIED_DIR))
 			continue;
@@ -2026,8 +2037,7 @@ static void touch_up_dirs(struct file_list *flist, int ndx)
 		}
 		/* Be sure not to retouch permissions with --fake-super. */
 		fix_dir_perms = !am_root && !(file->mode & S_IWUSR);
-		if (!F_IS_ACTIVE(file) || file->flags & FLAG_MISSING_DIR
-		 || !(need_retouch_dir_times || fix_dir_perms))
+		if (file->flags & FLAG_MISSING_DIR || !(need_retouch_dir_times || fix_dir_perms))
 			continue;
 		fname = f_name(file, NULL);
 		if (fix_dir_perms)


-- 
The rsync repository.


More information about the rsync-cvs mailing list