Skip to content

Commit

Permalink
MAX_SYMLINKS --> _MAX_SYMLINKS
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed Sep 9, 2023
1 parent 0ee10ca commit 17eee2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#

# Maximum number of symlinks to follow in _PathBase.resolve()
MAX_SYMLINKS = 40
_MAX_SYMLINKS = 40

# Reference for Windows paths can be found at
# https://learn.microsoft.com/en-gb/windows/win32/fileio/naming-a-file .
Expand Down Expand Up @@ -1293,7 +1293,7 @@ def resolve(self, strict=False):
break
else:
link_count += 1
if link_count >= MAX_SYMLINKS:
if link_count >= _MAX_SYMLINKS:
raise OSError(ELOOP, "Too many symbolic links in path", path)
elif link_target.root or link_target.drive:
link_target = link.parent / link_target
Expand Down

0 comments on commit 17eee2f

Please sign in to comment.