mercurial/windows.py
changeset 51720 e618a1756b08
parent 51716 f3b34386d3e0
child 51799 1888846a1ee2
--- a/mercurial/windows.py	Thu Jul 18 22:46:36 2024 -0400
+++ b/mercurial/windows.py	Fri Jul 19 16:38:53 2024 -0400
@@ -620,10 +620,10 @@
     return None
 
 
-def readlink(pathname: bytes) -> bytes:
-    path = pycompat.fsdecode(pathname)
+def readlink(path: bytes) -> bytes:
+    path_str = pycompat.fsdecode(path)
     try:
-        link = os.readlink(path)
+        link = os.readlink(path_str)
     except ValueError as e:
         # On py2, os.readlink() raises an AttributeError since it is
         # unsupported.  On py3, reading a non-link raises a ValueError.  Simply