Some new blood and some updated versions.

This commit is contained in:
Guido van Rossum 1998-10-02 01:23:47 +00:00
parent fdb8fb8b31
commit 64e736ba4e
7 changed files with 1105 additions and 14 deletions

View file

@ -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