summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/_bootstrap.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index 142461a..6478db5 100644
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -842,7 +842,8 @@ class _FileFinder:
# We store two cached versions, to handle runtime changes of the
# PYTHONCASEOK environment variable.
self._path_cache = set(contents)
- self._relaxed_path_cache = set(fn.lower() for fn in contents)
+ if sys.platform.startswith(CASE_INSENSITIVE_PLATFORMS):
+ self._relaxed_path_cache = set(fn.lower() for fn in contents)
class _SourceFinderDetails: