[PATCH] Make make_backup switch on backup_dir_dels, not backup_dir, for deletions.

Matt McCutchen matt at mattmccutchen.net
Tue Mar 11 04:50:54 GMT 2008


---
This should fix the problem with --backup-dir-dels not working by
itself.

 backup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/backup.c b/backup.c
index d2a7622..ea53306 100644
--- a/backup.c
+++ b/backup.c
@@ -347,7 +347,7 @@ static int keep_backup(const char *fname)
 /* main backup switch routine */
 int make_backup(const char *fname)
 {
-	if (backup_dir)
+	if (deleting ? backup_dir_dels : backup_dir)
 		return keep_backup(fname);
 	return make_simple_backup(fname);
 }
-- 
1.5.4.3.193.g6dd0e



More information about the rsync mailing list