mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-41043: Escape literal part of the path for glob(). (GH-20994)
This commit is contained in:
parent
a041e116db
commit
9355868458
24 changed files with 37 additions and 31 deletions
|
|
@ -37,7 +37,9 @@ IGNORED_VARS = {
|
|||
def find_capi_vars(root):
|
||||
capi_vars = {}
|
||||
for dirname in SOURCE_DIRS:
|
||||
for filename in glob.glob(os.path.join(ROOT_DIR, dirname, '**/*.[hc]'),
|
||||
for filename in glob.glob(os.path.join(
|
||||
glob.escape(os.path.join(ROOT_DIR, dirname)),
|
||||
'**/*.[hc]'),
|
||||
recursive=True):
|
||||
with open(filename) as file:
|
||||
for name in _find_capi_vars(file):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue