Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c1bdbc31
Commit
c1bdbc31
authored
Nov 07, 2007
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetic changes to Christian's patch r58903.
(Consider this code review feedback. :-)
parent
7d3bc0ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
Python/import.c
Python/import.c
+4
-6
No files found.
Python/import.c
View file @
c1bdbc31
...
...
@@ -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 of
f
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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment