Don't include MATCHFLG_PERISHABLE in CVS-exclude handling unless
authorWayne Davison <wayned@samba.org>
Thu, 28 Dec 2006 06:27:22 +0000 (06:27 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 28 Dec 2006 06:27:22 +0000 (06:27 +0000)
we're talking protocol 30 or above.

exclude.c

index 11b187c6e344544012865452524b4f1db8c99105..cfaed26f147bd9c01b03336463d066ed0ab0311a 100644 (file)
--- a/exclude.c
+++ b/exclude.c
@@ -879,14 +879,16 @@ static char default_cvsignore[] =
 
 static void get_cvs_excludes(uint32 mflags)
 {
-       char *p, fname[MAXPATHLEN];
        static int initialized = 0;
+       char *p, fname[MAXPATHLEN];
 
        if (initialized)
                return;
        initialized = 1;
 
-       parse_rule(&cvs_filter_list, default_cvsignore, mflags | MATCHFLG_PERISHABLE, 0);
+       parse_rule(&cvs_filter_list, default_cvsignore,
+                  mflags | (protocol_version >= 30 ? MATCHFLG_PERISHABLE : 0),
+                  0);
 
        p = module_id >= 0 && lp_use_chroot(module_id) ? "/" : getenv("HOME");
        if (p && pathjoin(fname, MAXPATHLEN, p, ".cvsignore") < MAXPATHLEN)