Skip to content

Commit

Permalink
Absolutized exclusion wilcards bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrymin committed Mar 8, 2012
1 parent 3acc9d7 commit 74aa4ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion realsync
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 74aa4ba

Please sign in to comment.