From: Thomas Wouters Date: Tue, 3 Jun 2025 12:25:37 +0000 (+0200) Subject: Revert "Fix a glaring error in the logic backport of posixpath." X-Git-Tag: v3.10.18~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e0cb9afea4af59b65ce4954f8062473c0c8d6f90;p=thirdparty%2FPython%2Fcpython.git Revert "Fix a glaring error in the logic backport of posixpath." This reverts commit b357f2bca375948aca03047d9209ce364e64bfa4, which was never meant to go into 3.10. --- 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)