mirror of
https://github.com/python/cpython.git
synced 2024-11-24 02:15:30 +08:00
Case-checking was broken on the Macintosh. Fixed.
This commit is contained in:
parent
fddef433d1
commit
4df3c5284f
@ -979,13 +979,13 @@ find_module(char *realname, PyObject *path, char *buf, size_t buflen,
|
||||
#endif
|
||||
#ifdef macintosh
|
||||
fdp = PyMac_FindModuleExtension(buf, &len, name);
|
||||
if (fdp)
|
||||
fp = fopen(buf, fdp->mode);
|
||||
if (fdp) {
|
||||
#else
|
||||
for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) {
|
||||
strcpy(buf+len, fdp->suffix);
|
||||
if (Py_VerboseFlag > 1)
|
||||
PySys_WriteStderr("# trying %s\n", buf);
|
||||
#endif /* !macintosh */
|
||||
fp = fopen(buf, fdp->mode);
|
||||
if (fp != NULL) {
|
||||
if (case_ok(buf, len, namelen, name))
|
||||
@ -996,7 +996,6 @@ find_module(char *realname, PyObject *path, char *buf, size_t buflen,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* !macintosh */
|
||||
if (fp != NULL)
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user