mirror of
https://github.com/python/cpython.git
synced 2025-08-17 07:11:51 +00:00
Merged revisions 78247 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78247 | ezio.melotti | 2010-02-20 10:09:39 +0200 (Sat, 20 Feb 2010) | 1 line #3426: os.path.abspath now returns unicode when its arg is unicode. ........
This commit is contained in:
parent
aaa210e2fd
commit
502f8eb50b
8 changed files with 76 additions and 5 deletions
|
@ -146,7 +146,11 @@ def normpath(path):
|
|||
def abspath(path):
|
||||
"""Return the absolute version of a path"""
|
||||
if not isabs(path):
|
||||
path = join(os.getcwd(), path)
|
||||
if isinstance(path, unicode):
|
||||
cwd = os.getcwdu()
|
||||
else:
|
||||
cwd = os.getcwd()
|
||||
path = join(cwd, path)
|
||||
return normpath(path)
|
||||
|
||||
# realpath is a no-op on systems without islink support
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue