Visitar URL original
GH-80486: Fix handling of NTFS alternate data streams in pathlib by barneygale · Pull Request #102454 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix _format_parsed_parts()
  • Loading branch information
barneygale committed Mar 6, 2023
commit fe5cfb3c4bd04f2375742bc9d84933a902e2c732
5 changes: 3 additions & 2 deletions Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,9 @@ def _from_parsed_parts(cls, drv, root, parts):
def _format_parsed_parts(cls, drv, root, parts):
if drv or root:
return drv + root + cls._flavour.sep.join(parts[1:])
else:
return cls._flavour.sep.join(parts)
elif parts and cls._flavour.splitdrive(parts[0])[0]:
Comment thread
barneygale marked this conversation as resolved.
parts = ['.'] + parts
return cls._flavour.sep.join(parts)

def __str__(self):
"""Return the string representation of the path, suitable for
Expand Down