summaryrefslogtreecommitdiffstats
path: root/Lib/macpath.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-02-20 08:09:39 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-02-20 08:09:39 (GMT)
commit4cc80ca921b4f6bce11bd7eec8bc6b561aa9f524 (patch)
tree9951e02d8dec6e305ab5fa184b93c9d0e534eea5 /Lib/macpath.py
parent61afd2694bf6bff8c65a392aaf27c575d92b7eb9 (diff)
downloadcpython-4cc80ca921b4f6bce11bd7eec8bc6b561aa9f524.zip
cpython-4cc80ca921b4f6bce11bd7eec8bc6b561aa9f524.tar.gz
cpython-4cc80ca921b4f6bce11bd7eec8bc6b561aa9f524.tar.bz2
#3426: os.path.abspath now returns unicode when its arg is unicode.
Diffstat (limited to 'Lib/macpath.py')
-rw-r--r--Lib/macpath.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py
index 14e49a3..15714c6 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -186,7 +186,11 @@ def walk(top, func, arg):
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