Skip to content

Commit 495bd8b

Browse files
committed
Call os.stat() to raise OSError(errno.ELOOP, ...).
1 parent 2894e0a commit 495bd8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/posixpath.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,8 @@ def _joinrealpath(path, rest, strict, seen):
445445
# use cached value
446446
continue
447447
# The symlink is not resolved, so we must have a symlink loop.
448-
raise OSError(errno.ELOOP, os.strerror(errno.ELOOP), newpath)
448+
# Raise OSError(errno.ELOOP)
449+
os.stat(newpath)
449450
path = _joinrealpath(path, os.readlink(newpath), strict, seen)
450451
seen[newpath] = path # resolved symlink
451452

0 commit comments

Comments
 (0)