File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
{{cookiecutter.github_project_name}} Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -596,9 +596,6 @@ def _join_translated(translated_parts, os_sep_class):
596
596
This is different from a simple join, as care need to be taken
597
597
to allow ** to match ZERO or more directories.
598
598
"""
599
- if len (translated_parts ) < 2 :
600
- return translated_parts [0 ]
601
-
602
599
res = ''
603
600
for part in translated_parts [:- 1 ]:
604
601
if part == '.*' :
@@ -607,9 +604,12 @@ def _join_translated(translated_parts, os_sep_class):
607
604
res += part
608
605
else :
609
606
res += part + os_sep_class
607
+
610
608
if translated_parts [- 1 ] == '.*' :
611
- # Final part is **, undefined behavior since we don't check against filesystem
609
+ # Final part is **
612
610
res += translated_parts [- 1 ]
611
+ # Follow stdlib/git convention of matching all sub files/directories:
612
+ res += '({os_sep_class}?.*)?' .format (os_sep_class = os_sep_class )
613
613
else :
614
614
res += translated_parts [- 1 ]
615
615
return res
You can’t perform that action at this time.
0 commit comments