Mercurial > cpython-lru_cache-weakref
diff Lib/macpath.py @ 59467:733ccc3f3a68
Fix macpath to deal with bytes
| author | Florent Xicluna <florent.xicluna@gmail.com> |
|---|---|
| date | Mon, 08 Mar 2010 12:25:35 +0000 |
| parents | 16a194da77de |
| children | 44ffb8092ed6 |
line wrap: on
line diff
--- a/Lib/macpath.py Mon Mar 08 12:24:53 2010 +0000 +++ b/Lib/macpath.py Mon Mar 08 12:25:35 2010 +0000 @@ -172,7 +172,11 @@ def abspath(path): """Return an absolute path.""" if not isabs(path): - path = join(os.getcwd(), path) + if isinstance(path, bytes): + cwd = os.getcwdb() + else: + cwd = os.getcwd() + path = join(cwd, path) return normpath(path) # realpath is a no-op on systems without islink support
