diff options
author | Guido van Rossum <guido@python.org> | 2007-11-07 17:46:34 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-11-07 17:46:34 (GMT) |
commit | c1bdbc316de9a433ced7d26e8cfb3039e0768cbb (patch) | |
tree | 7a93758a38f9084d978bc971e604c6b8270d200e /Python | |
parent | 7d3bc0ade62ed38b26be03f408ad99f8fe290b5b (diff) | |
download | cpython-c1bdbc316de9a433ced7d26e8cfb3039e0768cbb.zip cpython-c1bdbc316de9a433ced7d26e8cfb3039e0768cbb.tar.gz cpython-c1bdbc316de9a433ced7d26e8cfb3039e0768cbb.tar.bz2 |
Cosmetic changes to Christian's patch r58903.
(Consider this code review feedback. :-)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/import.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Python/import.c b/Python/import.c index d2922e9..b97b3eb 100644 --- a/Python/import.c +++ b/Python/import.c @@ -2939,12 +2939,12 @@ NullImporter_init(NullImporter *self, PyObject *args, PyObject *kwds) struct stat statbuf; int rv; + rv = stat(path, &statbuf); #ifdef MS_WINDOWS - /* MS Windows' stat chokes on paths like C:\\path\\. Try to - * recover *one* time by stripping of a trailing slash or - * back slash. http://bugs.python.org/issue1293 + /* MS Windows stat() chokes on paths like C:\path\. Try to + * recover *one* time by stripping off a trailing slash or + * backslash. http://bugs.python.org/issue1293 */ - rv = stat(path, &statbuf); if (rv != 0 && pathlen <= MAXPATHLEN && (path[pathlen-1] == '/' || path[pathlen-1] == '\\')) { char mangled[MAXPATHLEN+1]; @@ -2953,8 +2953,6 @@ NullImporter_init(NullImporter *self, PyObject *args, PyObject *kwds) mangled[pathlen-1] = '\0'; rv = stat(mangled, &statbuf); } -#else - rv = stat(path, &statbuf); #endif if (rv == 0) { /* it exists */ |