Thanks to visit codestin.com
Credit goes to github.com

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
Maintain _drv, _root, _tail_cached values in children.
  • Loading branch information
barneygale committed Dec 17, 2023
commit 38360dca970f7d0054d5088a559e25f2c31da09d
3 changes: 3 additions & 0 deletions Lib/pathlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ def _make_child_entry(self, entry):
# Transform an entry yielded from _scandir() into a path object.
path = self.with_segments(entry.path)
path._str = entry.name if str(self) == '.' else entry.path
path._drv = self.drive
path._root = self.root
path._tail_cached = self._tail + [entry.name]
return path

def absolute(self):
Expand Down