bpo-46362: Ensure ntpath.abspath() uses the Windows API correctly (GH-30571)

This makes ntpath.abspath()/getpath_abspath() follow normpath(), since some WinAPIs such as PathCchSkipRoot() require backslashed paths.
This commit is contained in:
neonene 2022-01-14 08:35:42 +09:00 committed by GitHub
parent b8ddf7e794
commit d4e64cd4b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 114 additions and 42 deletions

View file

@ -235,6 +235,9 @@ extern int _Py_EncodeNonUnicodeWchar_InPlace(
extern int _Py_isabs(const wchar_t *path);
extern int _Py_abspath(const wchar_t *path, wchar_t **abspath_p);
#ifdef MS_WINDOWS
extern int _PyOS_getfullpathname(const wchar_t *path, wchar_t **abspath_p);
#endif
extern wchar_t * _Py_join_relfile(const wchar_t *dirname,
const wchar_t *relfile);
extern int _Py_add_relfile(wchar_t *dirname,