summaryrefslogtreecommitdiff
path: root/Lib/macpath.py
diff options
context:
space:
mode:
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 c023646244..f58a195792 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