mirror of
https://github.com/python/cpython.git
synced 2025-10-13 10:23:28 +00:00
Issue #27083: Respect the PYTHONCASEOK environment variable under
Windows. Originally only b'PYTHONCASEOK' was being checked for in os.environ, but that won't work under Windows where all environment variables are strings (on OS X they are bytes). Thanks to Eryk Sun for the bug report.
This commit is contained in:
parent
f76457e122
commit
a47a7a5bf8
3 changed files with 13 additions and 7 deletions
|
@ -29,7 +29,8 @@ def _make_relax_case():
|
|||
if sys.platform.startswith(_CASE_INSENSITIVE_PLATFORMS):
|
||||
def _relax_case():
|
||||
"""True if filenames must be checked case-insensitively."""
|
||||
return b'PYTHONCASEOK' in _os.environ
|
||||
return (b'PYTHONCASEOK' in _os.environ
|
||||
or 'PYTHONCASEOK' in _os.environ)
|
||||
else:
|
||||
def _relax_case():
|
||||
"""True if filenames must be checked case-insensitively."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue