summaryrefslogtreecommitdiffstats
path: root/Doc/library/os.path.rst
diff options
context:
space:
mode:
authorBarney Gale <barney.gale@gmail.com>2024-04-10 17:17:18 (GMT)
committerGitHub <noreply@github.com>2024-04-10 17:17:18 (GMT)
commit630df37116b1c5b381984c547ef9d23792ceb464 (patch)
tree35a80caf614d9ee2d9b2076004ecc2c996b459e1 /Doc/library/os.path.rst
parent6bc0b33a91713ee62fd1860d28b19cb620c45971 (diff)
downloadcpython-630df37116b1c5b381984c547ef9d23792ceb464.zip
cpython-630df37116b1c5b381984c547ef9d23792ceb464.tar.gz
cpython-630df37116b1c5b381984c547ef9d23792ceb464.tar.bz2
GH-117546: Fix symlink resolution in `os.path.realpath('loop/../link')` (#117568)
Continue resolving symlink targets after encountering a symlink loop, which matches coreutils `realpath` behaviour.
Diffstat (limited to 'Doc/library/os.path.rst')
-rw-r--r--Doc/library/os.path.rst5
1 files changed, 2 insertions, 3 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index fcf4b6d..ebeb3bb 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -409,9 +409,8 @@ the :mod:`glob` module.)
style names such as ``C:\\PROGRA~1`` to ``C:\\Program Files``.
If a path doesn't exist or a symlink loop is encountered, and *strict* is
- ``True``, :exc:`OSError` is raised. If *strict* is ``False``, the path is
- resolved as far as possible and any remainder is appended without checking
- whether it exists.
+ ``True``, :exc:`OSError` is raised. If *strict* is ``False`` these errors
+ are ignored, and so the result might be missing or otherwise inaccessible.
.. note::
This function emulates the operating system's procedure for making a path