diff options
Diffstat (limited to 'Lib/posixpath.py')
-rw-r--r-- | Lib/posixpath.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py index 9eac6bc13e..b396f0ace5 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -328,8 +328,7 @@ def expanduser(path): except KeyError: return path userhome = pwent.pw_dir - if userhome.endswith('/'): - i += 1 + userhome = userhome.rstrip('/') return userhome + path[i:] |