Commit bbb4e10e authored by Guido van Rossum's avatar Guido van Rossum

Subtlety: ~root/a should expand to /a, not //a. Everything else unchanged.

parent ededb58c
......@@ -241,6 +241,7 @@ def expanduser(path):
except KeyError:
return path
userhome = pwent[5]
if userhome[-1:] == '/': i = i+1
return userhome + path[i:]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment