fixed passing of directory exclude options to remote side (thanks to
authorAndrew Tridgell <tridge@samba.org>
Mon, 8 Nov 1999 09:12:42 +0000 (09:12 +0000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 8 Nov 1999 09:12:42 +0000 (09:12 +0000)
andrewdagger@xerox.gbr.com)

added note about multiple excludes per exclude option

exclude.c
rsync.yo

index 444a2b4..d8aa494 100644 (file)
--- 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;
index 0b46cde..2ebcd66 100644 (file)
--- 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(