Browse files

Absolutized exclusion wilcards bugfix.

  • Loading branch information...
1 parent 3acc9d7 commit 74aa4ba622134784e7d125eceaf30344d734f1d4 @dmitrymin dmitrymin committed Mar 9, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 realsync
View
6 realsync
@@ -873,7 +873,11 @@ sub mask_to_re {
if ($is_basename_mask) {
$mask = '(?:[/\\\\]|^)' . $mask . '(?:[/\\\\]|$)';
} else {
- $mask = '^(?:\.[/\\\\])?' . $mask . '$';
+ # Rel path to match with such mask is always started with "./",
+ # but before matching the first character is cut. So when we
+ # check rel path like "./aaa/bbb" to be matched by "aaa/b*" mask,
+ # we are really executing "/aaa/bbb" =~ m{^(?:[/\\\\])?aaa/b.*$}.
+ $mask = '^(?:[/\\\\])?' . $mask . '$';
}
return $mask;
}

0 comments on commit 74aa4ba

Please sign in to comment.