Skip to content

Commit 740953b

Browse files
committed
Call accessor.stat() from only one method.
1 parent 7d33921 commit 740953b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/pathlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ def samefile(self, other_path):
10051005
try:
10061006
other_st = other_path.stat()
10071007
except AttributeError:
1008-
other_st = self._accessor.stat(other_path)
1008+
other_st = self.__class__(other_path).stat()
10091009
return os.path.samestat(st, other_st)
10101010

10111011
def iterdir(self):

0 commit comments

Comments
 (0)