Skip to content

Commit f3855f8

Browse files
committed
Call accessor.link() from only one method.
1 parent 57f40f7 commit f3855f8

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
@@ -1276,7 +1276,7 @@ def link_to(self, target):
12761276
"for removal in Python 3.12. "
12771277
"Use pathlib.Path.hardlink_to() instead.",
12781278
DeprecationWarning, stacklevel=2)
1279-
self._accessor.link(self, target)
1279+
self.__class__(target).hardlink_to(self)
12801280

12811281
# Convenience functions for querying the stat results
12821282

0 commit comments

Comments
 (0)