summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-08 12:25:35 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-08 12:25:35 (GMT)
commit19b02d4558515e761755346dd1c119cf6ad55352 (patch)
tree78c3b81cba24fd47c64dbe924955f442f2debee2
parentc9c79784cf675819981e54b9c64a9ec114aff994 (diff)
downloadcpython-19b02d4558515e761755346dd1c119cf6ad55352.zip
cpython-19b02d4558515e761755346dd1c119cf6ad55352.tar.gz
cpython-19b02d4558515e761755346dd1c119cf6ad55352.tar.bz2
Fix macpath to deal with bytes
-rw-r--r--Lib/macpath.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py
index c023646..f58a195 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -172,7 +172,11 @@ def normpath(s):
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