summaryrefslogtreecommitdiff
path: root/Lib/ntpath.py
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2019-03-12 08:39:57 -0700
committerSteve Dower <steve.dower@microsoft.com>2019-03-12 08:39:57 -0700
commit25ec4a45dcc36c8087f93bd1634b311613244fc6 (patch)
tree1e5e08a4ee2c9f1625ad980528285cd7b3d4d5fd /Lib/ntpath.py
parent410aea1ebf2f56364369be3b477763ce78577c07 (diff)
downloadcpython-git-25ec4a45dcc36c8087f93bd1634b311613244fc6.tar.gz
bpo-36264: Don't honor POSIX HOME in os.path.expanduser on Windows (GH-12282)
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r--Lib/ntpath.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index 11bb297e16..b5e1d121fc 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -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