summaryrefslogtreecommitdiff
path: root/net/rsync/files/patch-receiver.c
blob: f4d0639975f7bde6c35b8449162b46fd6de15c5c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
# Fix an off-by-one error in the handling of --max-delete=N
# http://lists.samba.org/archive/rsync/2004-October/010853.html
#
--- receiver.c.orig	Tue Sep 21 11:24:06 2004
+++ receiver.c	Wed Oct 20 08:12:19 2004
@@ -116,7 +116,7 @@
 			rprintf(FINFO, "deleting in %s\n", safe_fname(fbuf));
 
 		for (i = local_file_list->count-1; i >= 0; i--) {
-			if (max_delete && deletion_count > max_delete)
+			if (max_delete && deletion_count >= max_delete)
 				break;
 			if (!local_file_list->files[i]->basename)
 				continue;