summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ntpath.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index 034694d..f8334e5 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -416,8 +416,11 @@ def abspath(path):
return normpath(path)
abspath = _abspath
return _abspath(path)
- try:
- path = win32api.GetFullPathName(path)
- except win32api.error:
- pass # Bad path - return unchanged.
+ if path: # Empty path must return current working directory.
+ try:
+ path = win32api.GetFullPathName(path)
+ except win32api.error:
+ pass # Bad path - return unchanged.
+ else:
+ path = os.getcwd()
return normpath(path)