Author: guido.van.rossum
Date: Wed Nov 7 18:46:34 2007
New Revision: 58904
Modified:
python/branches/py3k/Python/import.c
Log:
Cosmetic changes to Christian's patch r58903.
(Consider this code review feedback. :-)
Modified: python/branches/py3k/Python/import.c
==============================================================================
--- python/branches/py3k/Python/import.c (original)
+++ python/branches/py3k/Python/import.c Wed Nov 7 18:46:34 2007
@@ -2939,12 +2939,12 @@
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 @@
mangled[pathlen-1] = '\0';
rv = stat(mangled, &statbuf);
}
-#else
- rv = stat(path, &statbuf);
#endif
if (rv == 0) {
/* it exists */
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins