The uploader tail shortcut to skip dir postprocessing should also check
authorclaudio <claudio@openbsd.org>
Mon, 27 Nov 2023 11:28:39 +0000 (11:28 +0000)
committerclaudio <claudio@openbsd.org>
Mon, 27 Nov 2023 11:28:39 +0000 (11:28 +0000)
if ignore_dir_times is set. In that case preserve_times loses its meaning.
OK tb@

usr.bin/rsync/uploader.c

index 25b3be6..6cb6d05 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: uploader.c,v 1.35 2023/11/23 11:59:53 job Exp $ */
+/*     $OpenBSD: uploader.c,v 1.36 2023/11/27 11:28:39 claudio Exp $ */
 /*
  * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2019 Florian Obser <florian@openbsd.org>
@@ -1099,8 +1099,7 @@ rsync_uploader_tail(struct upload *u, struct sess *sess)
 {
        size_t   i;
 
-
-       if (!sess->opts->preserve_times &&
+       if ((!sess->opts->preserve_times || sess->opts->ignore_dir_times) &&
            !sess->opts->preserve_perms)
                return 1;