Commit 257b3bfa authored by Tim Peters's avatar Tim Peters

Repair the Windows build (S_ISDIR() macro doesn't exist).

Somebody else should feel free to repair this a different way; see Python-
Dev for discussion.
parent e54acfd8
......@@ -592,7 +592,7 @@ builtin_execfile(PyObject *self, PyObject *args)
exists = 0;
/* Test for existence or directory. */
if (!stat(filename, &s)) {
if (S_ISDIR(s.st_mode))
if ((s.st_mode & S_IFMT) == S_IFDIR)
errno = EISDIR;
else
exists = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment