Fixed an off-by-one error in the handling of --max-delete=N.
authorWayne Davison <wayned@samba.org>
Mon, 18 Oct 2004 20:41:57 +0000 (20:41 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 18 Oct 2004 20:41:57 +0000 (20:41 +0000)
receiver.c

index 3ce5528..124a280 100644 (file)
@@ -116,7 +116,7 @@ void delete_files(struct file_list *flist)
                        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;