Commit 0737b728 authored by Jason R. Coombs's avatar Jason R. Coombs

Fix indentation

parent fa93cf8e
...@@ -116,28 +116,28 @@ static const struct filedescr _PyImport_StandardFiletab[] = { ...@@ -116,28 +116,28 @@ static const struct filedescr _PyImport_StandardFiletab[] = {
#ifdef MS_WINDOWS #ifdef MS_WINDOWS
int isdir(char *path) { int isdir(char *path) {
DWORD rv; DWORD rv;
/* see issue1293 and issue3677: /* see issue1293 and issue3677:
* stat() on Windows doesn't recognise paths like * stat() on Windows doesn't recognise paths like
* "e:\\shared\\" and "\\\\whiterab-c2znlh\\shared" as dirs. * "e:\\shared\\" and "\\\\whiterab-c2znlh\\shared" as dirs.
* Also reference issue6727: * Also reference issue6727:
* stat() on Windows is broken and doesn't resolve symlinks properly. * stat() on Windows is broken and doesn't resolve symlinks properly.
*/ */
rv = GetFileAttributesA(path); rv = GetFileAttributesA(path);
return rv != INVALID_FILE_ATTRIBUTES && rv & FILE_ATTRIBUTE_DIRECTORY; return rv != INVALID_FILE_ATTRIBUTES && rv & FILE_ATTRIBUTE_DIRECTORY;
} }
#else #else
#if HAVE_STAT #if HAVE_STAT
int isdir(char *path) { int isdir(char *path) {
struct stat statbuf; struct stat statbuf;
return stat(path, &statbuf) == 0 && S_ISDIR(statbuf.st_mode); return stat(path, &statbuf) == 0 && S_ISDIR(statbuf.st_mode);
} }
#else #else
#ifdef RISCOS #ifdef RISCOS
/* with RISCOS, isdir is in unixstuff */ /* with RISCOS, isdir is in unixstuff */
#else #else
int isdir(char *path) { int isdir(char *path) {
return 0; return 0;
} }
#endif /* RISCOS */ #endif /* RISCOS */
#endif /* HAVE_STAT */ #endif /* HAVE_STAT */
...@@ -3200,11 +3200,11 @@ NullImporter_init(NullImporter *self, PyObject *args, PyObject *kwds) ...@@ -3200,11 +3200,11 @@ NullImporter_init(NullImporter *self, PyObject *args, PyObject *kwds)
PyErr_SetString(PyExc_ImportError, "empty pathname"); PyErr_SetString(PyExc_ImportError, "empty pathname");
return -1; return -1;
} else { } else {
if(isdir(path)) { if(isdir(path)) {
PyErr_SetString(PyExc_ImportError, PyErr_SetString(PyExc_ImportError,
"existing directory"); "existing directory");
return -1; return -1;
} }
} }
return 0; return 0;
} }
......
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