a leading / in a pattern now means "use a absolute path match". This
[rsync/rsync.git] / exclude.c
index 83c0b39..7504f96 100644 (file)
--- a/exclude.c
+++ b/exclude.c
@@ -43,6 +43,8 @@ static int check_one_exclude(char *name,char *pattern)
 
   if (!name[0]) return 0;
 
+  if (*pattern == '/' && *name != '/') pattern++;
+
   if (is_regex(pattern)) {
     if (fnmatch(pattern, name, 0) == 0)
       return 1;