Skip to content

Commit

Permalink
Merge pull request #464 from gotlin/master
Browse files Browse the repository at this point in the history
Fixed filtering of include/exclude when topdir has escape characters.
  • Loading branch information
adrianschroeter authored Jul 2, 2024
2 parents 1d2ee11 + 07a1789 commit 8ad5d21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TarSCM/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def create_archive(self, scm_object, **kwargs):
# transform glob patterns to regular expressions
includes = ''
excludes = r'$.'
topdir_re = '(' + topdir + '/)('
topdir_re = '(' + re.escape(topdir) + '/)('
if args.include:
incl_arr = [fnmatch.translate(x + '*') for x in args.include]
match_list = r'|'.join(incl_arr)
Expand Down

0 comments on commit 8ad5d21

Please sign in to comment.