mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Bug #1213894: os.path.realpath didn't resolve symlinks that were the first
component of the path.
This commit is contained in:
parent
5661699995
commit
268e61cf74
3 changed files with 24 additions and 1 deletions
|
@ -414,7 +414,7 @@ symbolic links encountered in the path."""
|
|||
if isabs(filename):
|
||||
bits = ['/'] + filename.split('/')[1:]
|
||||
else:
|
||||
bits = filename.split('/')
|
||||
bits = [''] + filename.split('/')
|
||||
|
||||
for i in range(2, len(bits)+1):
|
||||
component = join(*bits[0:i])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue