a file that can't use it, while missing out on giving it to a file
that could use it.
-based-on: e94bad1c156fc3910f24e2b3b71a81b0b0bdeb70
+based-on: 9cd85b849672c93c4b1f534898585f92ec4de30d
diff --git a/backup.c b/backup.c
--- a/backup.c
+++ b/backup.c
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -39,6 +39,7 @@ extern int checksum_seed;
+@@ -40,6 +40,7 @@ extern int checksum_seed;
extern int basis_dir_cnt;
extern int prune_empty_dirs;
extern int protocol_version;
extern int protect_args;
extern int preserve_uid;
extern int preserve_gid;
-@@ -159,6 +160,7 @@ void set_allow_inc_recurse(void)
+@@ -166,6 +167,7 @@ void set_allow_inc_recurse(void)
allow_inc_recurse = 0;
else if (!am_sender
&& (delete_before || delete_after
+ || detect_renamed
|| delay_updates || prune_empty_dirs))
allow_inc_recurse = 0;
- else if (am_server && !local_server
+ else if (am_server && strchr(client_info, 'i') == NULL)
diff --git a/delete.c b/delete.c
--- a/delete.c
+++ b/delete.c
diff --git a/main.c b/main.c
--- a/main.c
+++ b/main.c
-@@ -721,7 +721,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
- trailing_slash = cp && !cp[1];
+@@ -722,7 +722,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
if (mkpath_dest_arg && statret < 0 && (cp || file_total > 1)) {
+ int save_errno = errno;
- int ret = make_path(dest_path, file_total > 1 && !trailing_slash ? 0 : MKP_DROP_NAME);
+ int ret = make_path(dest_path, ACCESSPERMS, file_total > 1 && !trailing_slash ? 0 : MKP_DROP_NAME);
if (ret < 0)
goto mkdir_error;
- if (INFO_GTE(NAME, 1)) {
+ if (ret && INFO_GTE(NAME, 1)) {
diff --git a/options.c b/options.c
--- a/options.c
+++ b/options.c
delay_updates ? "delay-updates" : "partial-dir");
return 0;
}
-@@ -2760,6 +2763,8 @@ void server_options(char **args, int *argc_p)
+@@ -2721,6 +2724,8 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--super";
if (size_only)
args[ac++] = "--size-only";
--compare-dest=DIR also compare destination files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
-@@ -2247,6 +2248,22 @@ your home directory (remove the '=' for that).
+@@ -2249,6 +2250,22 @@ your home directory (remove the '=' for that).
fuzzy-match files, so either use `--delete-after` or specify some filename
exclusions if you need to prevent this.
diff --git a/rsync.h b/rsync.h
--- a/rsync.h
+++ b/rsync.h
-@@ -272,7 +272,7 @@ enum msgcode {
+@@ -282,7 +282,7 @@ enum msgcode {
#define NDX_DEL_STATS -3
#define NDX_FLIST_OFFSET -101
#define DEL_NO_UID_WRITE (1<<0) /* file/dir has our uid w/o write perm */
#define DEL_RECURSE (1<<1) /* if dir, delete all contents */
#define DEL_DIR_IS_EMPTY (1<<2) /* internal delete_FUNCTIONS use only */
-@@ -282,6 +282,7 @@ enum msgcode {
+@@ -292,6 +292,7 @@ enum msgcode {
#define DEL_FOR_DEVICE (1<<6) /* making room for a replacement device */
#define DEL_FOR_SPECIAL (1<<7) /* making room for a replacement special */
#define DEL_FOR_BACKUP (1<<8) /* the delete is for a backup operation */
./configure (optional if already run)
make
-based-on: e94bad1c156fc3910f24e2b3b71a81b0b0bdeb70
+based-on: 9cd85b849672c93c4b1f534898585f92ec4de30d
diff --git a/compat.c b/compat.c
--- a/compat.c
+++ b/compat.c
-@@ -39,6 +39,7 @@ extern int checksum_seed;
+@@ -40,6 +40,7 @@ extern int checksum_seed;
extern int basis_dir_cnt;
extern int prune_empty_dirs;
extern int protocol_version;
extern int protect_args;
extern int preserve_uid;
extern int preserve_gid;
-@@ -46,6 +47,7 @@ extern int preserve_atimes;
+@@ -47,6 +48,7 @@ extern int preserve_atimes;
extern int preserve_crtimes;
extern int preserve_acls;
extern int preserve_xattrs;
extern int xfer_flags_as_varint;
extern int need_messages_from_generator;
extern int delete_mode, delete_before, delete_during, delete_after;
-@@ -77,7 +79,7 @@ int do_negotiated_strings = 0;
+@@ -78,7 +80,7 @@ int do_negotiated_strings = 0;
int xmit_id0_names = 0;
/* These index values are for the file-list's extra-attribute array. */
int receiver_symlink_times = 0; /* receiver can set the time on a symlink */
int sender_symlink_iconv = 0; /* sender should convert symlink content */
-@@ -566,6 +568,8 @@ void setup_protocol(int f_out,int f_in)
+@@ -572,6 +574,8 @@ void setup_protocol(int f_out,int f_in)
uid_ndx = ++file_extra_cnt;
if (preserve_gid)
gid_ndx = ++file_extra_cnt;
if (preserve_acls && !am_sender)
acls_ndx = ++file_extra_cnt;
if (preserve_xattrs)
-@@ -726,6 +730,10 @@ void setup_protocol(int f_out,int f_in)
+@@ -732,6 +736,10 @@ void setup_protocol(int f_out,int f_in)
fprintf(stderr, "Both rsync versions must be at least 3.2.0 for --crtimes.\n");
exit_cleanup(RERR_PROTOCOL);
}
extern int msgs2stderr;
extern int module_id;
extern int read_only;
-@@ -970,6 +974,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
+@@ -973,6 +977,22 @@ static int do_recv(int f_in, int f_out, char *local_name)
* points to an identical file won't be replaced by the referent. */
copy_links = copy_dirlinks = copy_unsafe_links = 0;
/* Now we use the descrip values to actually mark the options for refusal. */
for (op = long_options; op != list_end; op++) {
-@@ -2646,6 +2664,9 @@ void server_options(char **args, int *argc_p)
+@@ -2607,6 +2625,9 @@ void server_options(char **args, int *argc_p)
if (xfer_dirs && !recurse && delete_mode && am_sender)
args[ac++] = "--no-r";
if (do_compression && do_compression_level != CLVL_NOT_SPECIFIED) {
if (asprintf(&arg, "--compress-level=%d", do_compression_level) < 0)
goto oom;
-@@ -2754,6 +2775,16 @@ void server_options(char **args, int *argc_p)
+@@ -2715,6 +2736,16 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--delete-excluded";
if (force_delete)
args[ac++] = "--force";
--max-delete=NUM don't delete more than NUM files
--max-size=SIZE don't transfer any file larger than SIZE
--min-size=SIZE don't transfer any file smaller than SIZE
-@@ -717,6 +721,8 @@ your home directory (remove the '=' for that).
+@@ -714,6 +718,7 @@ your home directory (remove the '=' for that).
+ recursion and want to preserve almost everything. Be aware that it does
+ **not** include preserving ACLs (`-A`), xattrs (`-X`), atimes (`-U`),
+ crtimes (`-N`), nor the finding and preserving of hardlinks (`-H`).
++ It also does **not** imply `--fileflags`.
- Note that `-a` **does not preserve hardlinks**, because finding
- multiply-linked files is expensive. You must separately specify `-H`.
-+ Note also that for backward compatibility, `-a` currently does **not**
-+ imply the `--fileflags` option.
-
- 0. `--no-OPTION`
-
-@@ -1076,7 +1082,7 @@ your home directory (remove the '=' for that).
+ The only exception to the above equivalence is when
+ `--files-from` is specified, in which case `-r` is not implied.
+@@ -1078,7 +1083,7 @@ your home directory (remove the '=' for that).
Without this option, if the sending side has replaced a directory with a
symlink to a directory, the receiving side will delete anything that is in
the way of the new symlink, including a directory hierarchy (as long as
See also `--keep-dirlinks` for an analogous option for the receiving side.
-@@ -1262,6 +1268,29 @@ your home directory (remove the '=' for that).
+@@ -1264,6 +1269,29 @@ your home directory (remove the '=' for that).
those used by `--fake-super`) unless you repeat the option (e.g. `-XX`).
This "copy all xattrs" mode cannot be used with `--fake-super`.
0. `--chmod=CHMOD`
This option tells rsync to apply one or more comma-separated "chmod" modes
-@@ -1729,7 +1758,7 @@ your home directory (remove the '=' for that).
+@@ -1731,7 +1759,7 @@ your home directory (remove the '=' for that).
option a step farther: each missing arg will become a deletion request of
the corresponding destination file on the receiving side (should it exist).
If the destination file is a non-empty directory, it will only be
that, this option is independent of any other type of delete processing.
The missing source files are represented by special file-list entries which
-@@ -1740,15 +1769,16 @@ your home directory (remove the '=' for that).
+@@ -1742,15 +1770,16 @@ your home directory (remove the '=' for that).
Tells `--delete` to go ahead and delete files even when there are I/O
errors.
0. `--max-delete=NUM`
-@@ -2700,7 +2730,7 @@ your home directory (remove the '=' for that).
+@@ -2702,7 +2731,7 @@ your home directory (remove the '=' for that).
output of other verbose messages).
The "%i" escape has a cryptic output that is 11 letters long. The general
#define XMIT_CRTIME_EQ_MTIME (1<<17) /* any protocol - restricted by command-line option */
/* These flags are used in the live flist data. */
-@@ -182,6 +182,7 @@
+@@ -192,6 +192,7 @@
#define ATTRS_SKIP_MTIME (1<<1)
#define ATTRS_ACCURATE_TIME (1<<2)
#define ATTRS_SKIP_ATIME (1<<3)
#define ATTRS_SKIP_CRTIME (1<<5)
#define MSG_FLUSH 2
-@@ -210,6 +211,7 @@
+@@ -220,6 +221,7 @@
#define ITEM_REPORT_GROUP (1<<6)
#define ITEM_REPORT_ACL (1<<7)
#define ITEM_REPORT_XATTR (1<<8)
#define ITEM_REPORT_CRTIME (1<<10)
#define ITEM_BASIS_TYPE_FOLLOWS (1<<11)
#define ITEM_XNAME_FOLLOWS (1<<12)
-@@ -578,6 +580,31 @@ typedef unsigned int size_t;
+@@ -587,6 +589,31 @@ typedef unsigned int size_t;
#define SUPPORT_CRTIMES 1
#endif
/* Find a variable that is either exactly 32-bits or longer.
* If some code depends on 32-bit truncation, it will need to
* take special action in a "#if SIZEOF_INT32 > 4" section. */
-@@ -804,6 +831,7 @@ extern int pathname_ndx;
+@@ -813,6 +840,7 @@ extern int pathname_ndx;
extern int depth_ndx;
extern int uid_ndx;
extern int gid_ndx;
extern int acls_ndx;
extern int xattrs_ndx;
-@@ -858,6 +886,11 @@ extern int xattrs_ndx;
+@@ -867,6 +895,11 @@ extern int xattrs_ndx;
/* When the associated option is on, all entries will have these present: */
#define F_OWNER(f) REQ_EXTRA(f, uid_ndx)->unum
#define F_GROUP(f) REQ_EXTRA(f, gid_ndx)->unum
diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
--- a/testsuite/rsync.fns
+++ b/testsuite/rsync.fns
-@@ -23,9 +23,9 @@ todir="$tmpdir/to"
- chkdir="$tmpdir/chk"
+@@ -26,9 +26,9 @@ chkfile="$scratchdir/rsync.chk"
+ outfile="$scratchdir/rsync.out"
# For itemized output:
-all_plus='+++++++++'
diff --git a/usage.c b/usage.c
--- a/usage.c
+++ b/usage.c
-@@ -131,6 +131,11 @@ static void print_info_flags(enum logcode f)
+@@ -137,6 +137,11 @@ static void print_info_flags(enum logcode f)
#endif
"crtimes",