Mercurial > cpython-lru_cache-weakref
diff Lib/macpath.py @ 58963:eaf8a93cdbff legacy-trunk
#3426: os.path.abspath now returns unicode when its arg is unicode.
| author | Ezio Melotti <ezio.melotti@gmail.com> |
|---|---|
| date | Sat, 20 Feb 2010 08:09:39 +0000 |
| parents | a36fa2ce61b1 |
| children | 63f3a94f5e9d |
line wrap: on
line diff
--- a/Lib/macpath.py Fri Feb 19 23:53:17 2010 +0000 +++ b/Lib/macpath.py Sat Feb 20 08:09:39 2010 +0000 @@ -186,7 +186,11 @@ def abspath(path): """Return an absolute 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
