diff options
-rw-r--r-- | Lib/ntpath.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 6bab89d..5782cbe 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -369,6 +369,10 @@ def normpath(path): # Return an absolute path. def abspath(path): - if not isabs(path): - path = join(os.getcwd(), path) - return normpath(path) + try: + import win32api + return win32api.GetFullPathName(path) + except ImportError: + if not isabs(path): + path = join(os.getcwd(), path) + return normpath(path) |