From e0cb9afea4af59b65ce4954f8062473c0c8d6f90 Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Tue, 3 Jun 2025 14:25:37 +0200 Subject: [PATCH] Revert "Fix a glaring error in the logic backport of posixpath." This reverts commit b357f2bca375948aca03047d9209ce364e64bfa4, which was never meant to go into 3.10. --- Lib/posixpath.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/posixpath.py b/Lib/posixpath.py index 085a23d8e593..e550b470da5b 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -429,7 +429,9 @@ def _joinrealpath(path, rest, strict, seen): newpath = join(path, name) try: st = os.lstat(newpath) - except ignored_error: + except OSError: + if strict: + raise is_link = False else: is_link = stat.S_ISLNK(st.st_mode) -- 2.47.3