summaryrefslogtreecommitdiff
path: root/flist.c
diff options
context:
space:
mode:
authorWayne Davison <wayne@opencoder.net>2022-09-14 07:14:13 -0700
committerWayne Davison <wayne@opencoder.net>2022-09-14 07:14:13 -0700
commit71c2b5d0e386b845fb2f4d427568451f098008ff (patch)
treeea721526a10c31e23a76c73c16b45196ce4d412b /flist.c
parentf3f5d8420f97a6c0b27419cf1db24b93945b7395 (diff)
downloadrsync-71c2b5d0e386b845fb2f4d427568451f098008ff.tar.gz
Fix exclusion of /. with --relative.
Diffstat (limited to 'flist.c')
-rw-r--r--flist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/flist.c b/flist.c
index 0b259cca..82d686a6 100644
--- a/flist.c
+++ b/flist.c
@@ -988,7 +988,7 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x
exit_cleanup(RERR_UNSUPPORTED);
}
- if (*thisname != '.' || thisname[1] != '\0') {
+ if (*thisname == '/' ? thisname[1] != '.' || thisname[2] != '\0' : *thisname != '.' || thisname[1] != '\0') {
int filt_flags = S_ISDIR(mode) ? NAME_IS_DIR : NAME_IS_FILE;
if (!trust_sender_filter /* a per-dir filter rule means we must trust the sender's filtering */
&& filter_list.head && check_server_filter(&filter_list, FINFO, thisname, filt_flags) < 0) {