diff options
author | Guido van Rossum <guido@python.org> | 1996-04-02 22:30:03 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-04-02 22:30:03 (GMT) |
commit | bbb4e10e91f231bcb1cb012198b2262333f3e0ed (patch) | |
tree | f803e0c66c51e825c117ae831ffdd4ea5c8daefb /Lib/posixpath.py | |
parent | ededb58c140c74cd805b568c50edccb213a13b1a (diff) | |
download | cpython-bbb4e10e91f231bcb1cb012198b2262333f3e0ed.zip cpython-bbb4e10e91f231bcb1cb012198b2262333f3e0ed.tar.gz cpython-bbb4e10e91f231bcb1cb012198b2262333f3e0ed.tar.bz2 |
Subtlety: ~root/a should expand to /a, not //a. Everything else unchanged.
Diffstat (limited to 'Lib/posixpath.py')
-rw-r--r-- | Lib/posixpath.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py index c288f3b..d284834 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -241,6 +241,7 @@ def expanduser(path): except KeyError: return path userhome = pwent[5] + if userhome[-1:] == '/': i = i+1 return userhome + path[i:] |