]> granicus.if.org Git - python/commitdiff
Fix ntpath abspath to deal with bytes.
authorFlorent Xicluna <florent.xicluna@gmail.com>
Mon, 8 Mar 2010 14:44:41 +0000 (14:44 +0000)
committerFlorent Xicluna <florent.xicluna@gmail.com>
Mon, 8 Mar 2010 14:44:41 +0000 (14:44 +0000)
Lib/ntpath.py

index d16b6646eea2fd14860f0fa4685e7bb983776471..8d502942fa4614059b9fec72e568d6b870e83acc 100644 (file)
@@ -561,6 +561,8 @@ else:  # use native Windows method on Windows
                 path = _getfullpathname(path)
             except WindowsError:
                 pass # Bad path - return unchanged.
+        elif isinstance(path, bytes):
+            path = os.getcwdb()
         else:
             path = os.getcwd()
         return normpath(path)