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
dfa5d956
Commit
dfa5d956
authored
Jul 11, 2004
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove tabs introduced in last commit.
parent
3f7cb5d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Lib/posixpath.py
Lib/posixpath.py
+4
-4
No files found.
Lib/posixpath.py
View file @
dfa5d956
...
@@ -406,7 +406,7 @@ symbolic links encountered in the path."""
...
@@ -406,7 +406,7 @@ symbolic links encountered in the path."""
for
i
in
range
(
2
,
len
(
bits
)
+
1
):
for
i
in
range
(
2
,
len
(
bits
)
+
1
):
component
=
join
(
*
bits
[
0
:
i
])
component
=
join
(
*
bits
[
0
:
i
])
# Resolve symbolic links.
# Resolve symbolic links.
if
islink
(
component
):
if
islink
(
component
):
resolved
=
_resolve_link
(
component
)
resolved
=
_resolve_link
(
component
)
if
resolved
is
None
:
if
resolved
is
None
:
# Infinite loop -- return original component + rest of the path
# Infinite loop -- return original component + rest of the path
...
@@ -425,12 +425,12 @@ def _resolve_link(path):
...
@@ -425,12 +425,12 @@ def _resolve_link(path):
"""
"""
paths_seen
=
[]
paths_seen
=
[]
while
islink
(
path
):
while
islink
(
path
):
if
path
in
paths_seen
:
if
path
in
paths_seen
:
# Already seen this path, so we must have a symlink loop
# Already seen this path, so we must have a symlink loop
return
None
return
None
paths_seen
.
append
(
path
)
paths_seen
.
append
(
path
)
# Resolve where the link points to
# Resolve where the link points to
resolved
=
os
.
readlink
(
path
)
resolved
=
os
.
readlink
(
path
)
if
not
abspath
(
resolved
):
if
not
abspath
(
resolved
):
dir
=
dirname
(
path
)
dir
=
dirname
(
path
)
path
=
normpath
(
join
(
dir
,
resolved
))
path
=
normpath
(
join
(
dir
,
resolved
))
...
...
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