[PATCH] Protect files ending with --suffix-dels as well as --suffix.

Matt McCutchen matt at mattmccutchen.net
Tue Mar 11 04:52:42 GMT 2008


---
More work on backup-dir-dels...

 options.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/options.c b/options.c
index 3dd65fb..459ad58 100644
--- a/options.c
+++ b/options.c
@@ -1534,6 +1534,10 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain)
 		snprintf(err_buf, sizeof err_buf,
 			"--suffix-dels cannot be a null string without --backup-dir-dels\n");
 		return 0;
+	} else if (make_backups && delete_mode && !delete_excluded && !am_server) {
+		snprintf(backup_dir_dels_buf, sizeof backup_dir_dels_buf,
+			"P *%s", backup_suffix_dels);
+		parse_rule(&filter_list, backup_dir_dels_buf, 0, 0);
 	}
 
 	if (make_backups && !backup_dir) {
-- 
1.5.4.3.193.g6dd0e




More information about the rsync mailing list