aboutsummaryrefslogtreecommitdiffstats
path: root/main/rsync/Fix-regression-with---delay-updates.patch
blob: d914d14decbe7f53f31b06ff061ad94150f3d0c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 5a4ea7e468ae53c09b98803da3519727becb48ad Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 22 Jul 2021 13:30:17 +0200
Subject: [PATCH] Fix regression with --delay-updates (#192)

Fixes regression introduced with commit 3a7bf54ad520 (A resumed
partial-dir file is transferred in-place.)

Fixes https://github.com/WayneD/rsync/issues/192
---
 receiver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/receiver.c b/receiver.c
index e85c4779..b5020d07 100644
--- a/receiver.c
+++ b/receiver.c
@@ -881,7 +881,7 @@ int recv_files(int f_in, int f_out, char *local_name)
 					do_unlink(partialptr);
 				handle_partial_dir(partialptr, PDIR_DELETE);
 			}
-		} else if (keep_partial && partialptr && !one_inplace) {
+		} else if (keep_partial && partialptr && (!one_inplace || delay_updates)) {
 			if (!handle_partial_dir(partialptr, PDIR_CREATE)) {
 				rprintf(FERROR,
 					"Unable to create partial-dir for %s -- discarding %s.\n",