summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-07-02 07:05:35 (GMT)
committerGitHub <noreply@github.com>2020-07-02 07:05:35 (GMT)
commite73896241e55f452656fd8070eb79f344091bca0 (patch)
tree5ce7fe2022e0ce1d481347ee49dab9d5580fb501 /Lib/pdb.py
parentcbdacb94c1a096387e1fb37d4e44bb3847d0c4f8 (diff)
downloadcpython-e73896241e55f452656fd8070eb79f344091bca0.zip
cpython-e73896241e55f452656fd8070eb79f344091bca0.tar.gz
cpython-e73896241e55f452656fd8070eb79f344091bca0.tar.bz2
[3.8] bpo-41043: Escape literal part of the path for glob(). (GH-20994). (GH-21277)
(cherry picked from commit 935586845815f5b4c7814794413f6a812d4bd45f)
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 931a039..0810235 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -474,7 +474,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 + '/')