bpo-45720: Drop references to shlwapi.dll on Windows (GH-29417)

This commit is contained in:
Steve Dower 2021-11-05 23:06:45 +00:00 • committed by GitHub
parent 4d8f2e09b6
commit a4774f42e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 4 deletions

View file

@ -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");