File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -312,7 +312,8 @@ def expandvars(path):
312312
313313
314314# Normalize a path, e.g. A//B, A/./B and A/foo/../B all become A/B.
315- # Also, components of the path are silently truncated to 8+3 notation.
315+ # Previously, this function also truncated pathnames to 8+3 format,
316+ # but as this module is called "ntpath", that's obviously wrong!
316317
317318def normpath (path ):
318319 path = normcase (path )
@@ -331,17 +332,9 @@ def normpath(path):
331332 i = i - 1
332333 elif comps [i ] == '' and i > 0 and comps [i - 1 ] <> '' :
333334 del comps [i ]
334- elif '.' in comps [i ]:
335- comp = string .splitfields (comps [i ], '.' )
336- comps [i ] = comp [0 ][:8 ] + '.' + comp [1 ][:3 ]
337- i = i + 1
338- elif len (comps [i ]) > 8 :
339- comps [i ] = comps [i ][:8 ]
340- i = i + 1
341335 else :
342336 i = i + 1
343337 # If the path is now empty, substitute '.'
344338 if not prefix and not comps :
345339 comps .append ('.' )
346340 return prefix + string .joinfields (comps , os .sep )
347-
You can’t perform that action at this time.
0 commit comments