diff options
author | Guido van Rossum <guido@python.org> | 1998-09-08 22:28:06 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-09-08 22:28:06 (GMT) |
commit | a063303693464992a9ab70856992cb169a5909e8 (patch) | |
tree | b667e8368ea9b1c58fe8f92837bd6d1a1798e568 /Lib | |
parent | 86ad567c2e6d7bfa9a395c846cc126bd8de170fc (diff) | |
download | cpython-a063303693464992a9ab70856992cb169a5909e8.zip cpython-a063303693464992a9ab70856992cb169a5909e8.tar.gz cpython-a063303693464992a9ab70856992cb169a5909e8.tar.bz2 |
Patch suggested by Perry Stoll -- os.path.normpath(".//x") returned
"/x", should return "x".
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/posixpath.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py index a5c0de2..fb3b6a6 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -354,6 +354,8 @@ def normpath(path): while i < len(comps): if comps[i] == '.': del comps[i] + while i < len(comps) and comps[i] == '': + del comps[i] elif comps[i] == '..' and i > 0 and comps[i-1] not in ('', '..'): del comps[i-1:i+1] i = i-1 |