mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -473,7 +473,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
|
|||
except Exception:
|
||||
ret = []
|
||||
# Then, try to complete file names as well.
|
||||
globs = glob.glob(text + '*')
|
||||
globs = glob.glob(glob.escape(text) + '*')
|
||||
for fn in globs:
|
||||
if os.path.isdir(fn):
|
||||
ret.append(fn + '/')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue