summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
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/idlelib
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/idlelib')
-rw-r--r--Lib/idlelib/tree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/idlelib/tree.py b/Lib/idlelib/tree.py
index 6229be4..5947268 100644
--- a/Lib/idlelib/tree.py
+++ b/Lib/idlelib/tree.py
@@ -38,7 +38,7 @@ def listicons(icondir=ICONDIR):
"""Utility to display the available icons."""
root = Tk()
import glob
- list = glob.glob(os.path.join(icondir, "*.gif"))
+ list = glob.glob(os.path.join(glob.escape(icondir), "*.gif"))
list.sort()
images = []
row = column = 0