mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-45720: Drop references to shlwapi.dll on Windows (GH-29417)
This commit is contained in:
parent
4d8f2e09b6
commit
a4774f42e3
4 changed files with 7 additions and 4 deletions
|
|
@ -92,7 +92,6 @@
|
|||
|
||||
#include <windows.h>
|
||||
#include <pathcch.h>
|
||||
#include <shlwapi.h>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
|
|
@ -265,7 +264,8 @@ canonicalize(wchar_t *buffer, const wchar_t *path)
|
|||
return _PyStatus_NO_MEMORY();
|
||||
}
|
||||
|
||||
if (PathIsRelativeW(path)) {
|
||||
const wchar_t *pathTail;
|
||||
if (FAILED(PathCchSkipRoot(path, &pathTail)) || path == pathTail) {
|
||||
wchar_t buff[MAXPATHLEN + 1];
|
||||
if (!GetCurrentDirectoryW(MAXPATHLEN, buff)) {
|
||||
return _PyStatus_ERR("unable to find current working directory");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue