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
Call accessor.stat() from only one method.
  • Loading branch information
barneygale committed Jan 1, 2022
commit 740953b27735262d65cc7d29d5c07e2097193672
2 changes: 1 addition & 1 deletion Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ def samefile(self, other_path):
try:
other_st = other_path.stat()
except AttributeError:
other_st = self._accessor.stat(other_path)
other_st = self.__class__(other_path).stat()
return os.path.samestat(st, other_st)

def iterdir(self):
Expand Down