bpo-46049: Fixes ._pth support on non-Windows (GH-30051)
This commit is contained in:
@@ -141,7 +141,7 @@ getpath_hassuffix(PyObject *Py_UNUSED(self), PyObject *args)
|
||||
if (path) {
|
||||
suffix = PyUnicode_AsWideCharString(suffixobj, &suffixLen);
|
||||
if (suffix) {
|
||||
if (suffixLen < len ||
|
||||
if (suffixLen > len ||
|
||||
#ifdef MS_WINDOWS
|
||||
wcsicmp(&path[len - suffixLen], suffix) != 0
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user