summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
author박문식 <mooonsik.park@gmail.com>2023-10-05 14:49:07 (GMT)
committerGitHub <noreply@github.com>2023-10-05 14:49:07 (GMT)
commitd33aa18f15de482a01988aabc75907328e1f9c9f (patch)
tree16b6448d4cfd56a4f5723950aa1bb108b0b644f2 /Doc
parent2cb62c6437fa07e08b4778f7ab9baa5f16ac01f2 (diff)
downloadcpython-d33aa18f15de482a01988aabc75907328e1f9c9f.zip
cpython-d33aa18f15de482a01988aabc75907328e1f9c9f.tar.gz
cpython-d33aa18f15de482a01988aabc75907328e1f9c9f.tar.bz2
gh-82367: Use `FindFirstFile` Win32 API in `ntpath.realpath()` (GH-110298)
* Use `FindFirstFile` Win32 API to fix a bug where `ntpath.realpath()` breaks out of traversing a series of paths where a (handled) `ERROR_ACCESS_DENIED` or `ERROR_SHARING_VIOLATION` occurs. * Update docs to reflect that `ntpath.realpath()` eliminates MS-DOS style names.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/os.path.rst3
-rw-r--r--Doc/whatsnew/3.13.rst3
2 files changed, 5 insertions, 1 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index 6f9e085..95933f5 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -377,7 +377,8 @@ the :mod:`glob` module.)
Return the canonical path of the specified filename, eliminating any symbolic
links encountered in the path (if they are supported by the operating
- system).
+ system). On Windows, this function will also resolve MS-DOS (also called 8.3)
+ 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
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst
index 785deea..7a62963 100644
--- a/Doc/whatsnew/3.13.rst
+++ b/Doc/whatsnew/3.13.rst
@@ -97,6 +97,9 @@ Other Language Changes
if supported.
(Contributed by Victor Stinner in :gh:`109649`.)
+* :func:`os.path.realpath` now resolves MS-DOS style file names even if
+ the file is not accessible.
+ (Contributed by Moonsik Park in :gh:`82367`.)
New Modules
===========