]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Case-checking was broken on the Macintosh. Fixed.
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 20 Mar 2001 23:09:54 +0000 (23:09 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 20 Mar 2001 23:09:54 +0000 (23:09 +0000)
Python/import.c

index ef13c58e9bf217b5a49f22b107aabc5bb3dba5e5..7f49e57699355f953c78258efb598841c909a7ba 100644 (file)
@@ -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;
        }