#3426: os.path.abspath now returns unicode when its arg is unicode.

This commit is contained in:
Ezio Melotti 2010-02-20 08:09:39 +00:00
parent 61afd2694b
commit 4cc80ca921
8 changed files with 57 additions and 6 deletions

View file

@ -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