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.
This commit is contained in:
Tim Peters 2001-08-08 06:24:48 +00:00
parent e54acfd8b2
commit 257b3bfa76
1 changed files with 1 additions and 1 deletions

View File

@ -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;