Kaydet (Commit) 647d2fe1 authored tarafından Mark Hammond's avatar Mark Hammond

Fix for Bug #110673: os.abspatth() now always returns os.getcwd() on Windows, if…

Fix for Bug #110673: os.abspatth() now always returns os.getcwd() on Windows, if an empty path is specified.  It previously did not if an empty path was delegated to win32api.GetFullPathName())
üst 0d0b1e93
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment