diff options
author | Anthony Sottile <asottile@umich.edu> | 2019-03-12 08:39:57 -0700 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2019-03-12 08:39:57 -0700 |
commit | 25ec4a45dcc36c8087f93bd1634b311613244fc6 (patch) | |
tree | 1e5e08a4ee2c9f1625ad980528285cd7b3d4d5fd /Lib/ntpath.py | |
parent | 410aea1ebf2f56364369be3b477763ce78577c07 (diff) | |
download | cpython-25ec4a45dcc36c8087f93bd1634b311613244fc6.tar.gz cpython-25ec4a45dcc36c8087f93bd1634b311613244fc6.zip |
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.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 11bb297e16b..b5e1d121fc5 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 |