mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
bpo-45582: Fix getpath_isxfile() and test_embed on Windows (GH-29930)
This commit is contained in:
parent
612e59b53f
commit
af1db4eb55
2 changed files with 11 additions and 3 deletions
|
@ -230,7 +230,7 @@ getpath_isxfile(PyObject *Py_UNUSED(self), PyObject *args)
|
|||
DWORD attr = GetFileAttributesW(path);
|
||||
r = (attr != INVALID_FILE_ATTRIBUTES) &&
|
||||
!(attr & FILE_ATTRIBUTE_DIRECTORY) &&
|
||||
SUCCEEDED(PathCchFindExtension(path, cchPath, &ext)) &&
|
||||
SUCCEEDED(PathCchFindExtension(path, cchPath + 1, &ext)) &&
|
||||
(CompareStringOrdinal(ext, -1, L".exe", -1, 1 /* ignore case */) == CSTR_EQUAL)
|
||||
? Py_True : Py_False;
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue