From 2fb139c11b9d999ca5ac3ce31c4369132fa28fe6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 8 Nov 1999 09:12:42 +0000 Subject: [PATCH] fixed passing of directory exclude options to remote side (thanks to andrewdagger@xerox.gbr.com) added note about multiple excludes per exclude option --- exclude.c | 5 ++++- rsync.yo | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/exclude.c b/exclude.c index 444a2b48..d8aa494b 100644 --- a/exclude.c +++ b/exclude.c @@ -270,8 +270,11 @@ void send_exclude_list(int f) } for (i=0;exclude_list[i];i++) { - char *pattern = exclude_list[i]->pattern; int l; + char pattern[MAXPATHLEN]; + + strlcpy(pattern,exclude_list[i]->pattern,sizeof(pattern)); + if (exclude_list[i]->directory) strlcat(pattern,"/", sizeof(pattern)); l = strlen(pattern); if (l == 0) continue; diff --git a/rsync.yo b/rsync.yo index 0b46cde8..2ebcd666 100644 --- a/rsync.yo +++ b/rsync.yo @@ -650,6 +650,10 @@ skipped. If it is an include pattern then that filename is not skipped. If no matching include/exclude pattern is found then the filename is not skipped. +Note that the --include and --exclude options take one pattern +each. To add multiple patterns use the --include-from and +--exclude-from options or multiple --include and --exclude options. + The patterns can take several forms. The rules are: itemize( -- 2.34.1