# Normalize a path, e.g. A//B, A/./B and A/foo/../B all become A/B.
-# Also, components of the path are silently truncated to 8+3 notation.
+# Previously, this function also truncated pathnames to 8+3 format,
+# but as this module is called "ntpath", that's obviously wrong!
elif comps[i] == '' and i > 0 and comps[i-1] <> '':
- comp = string.splitfields(comps[i], '.')
- comps[i] = comp[:8] + '.' + comp[:3]
- elif len(comps[i]) > 8:
- comps[i] = comps[i][:8]
# If the path is now empty, substitute '.'
if not prefix and not comps:
return prefix + string.joinfields(comps, os.sep)