Lines Matching refs:comps
128 comps = path.split('/')
130 while i < len(comps):
131 if comps[i] == '.':
132 del comps[i]
133 elif comps[i] == '..' and i > 0 and comps[i-1] not in ('', '..'):
134 del comps[i-1:i+1]
136 elif comps[i] == '' and i > 0 and comps[i-1] != '':
137 del comps[i]
141 if not prefix and not comps:
142 comps.append('.')
143 return prefix + '/'.join(comps)