mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-36264: Don't honor POSIX HOME in os.path.expanduser on Windows (GH-12282)
This commit is contained in:
parent
410aea1ebf
commit
25ec4a45dc
6 changed files with 17 additions and 14 deletions
|
@ -299,9 +299,7 @@ def expanduser(path):
|
|||
while i < n and path[i] not in _get_bothseps(path):
|
||||
i += 1
|
||||
|
||||
if 'HOME' in os.environ:
|
||||
userhome = os.environ['HOME']
|
||||
elif 'USERPROFILE' in os.environ:
|
||||
if 'USERPROFILE' in os.environ:
|
||||
userhome = os.environ['USERPROFILE']
|
||||
elif not 'HOMEPATH' in os.environ:
|
||||
return path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue