Skip to content

Commit

Permalink
fix old verions
Browse files Browse the repository at this point in the history
  • Loading branch information
Lior Mizrahi committed Jul 3, 2024
1 parent 574fa07 commit f015748
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions s3path/old_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ def compile_pattern_parts(self, prefix, pattern, bucket):
if '**' in part:
new_regex_pattern += f'{self.sep}*(?s:{part.replace("**", ".*")})'
continue
if '*' == part:
new_regex_pattern += f'{self._path._flavour.sep}(?s:[^/]+)'
continue
new_regex_pattern += f'{self.sep}{fnmatch.translate(part)[:-2]}'
new_regex_pattern += r'/*\Z'
return re.compile(new_regex_pattern).fullmatch
Expand Down

0 comments on commit f015748

Please sign in to comment.