mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
Fix ntpath abspath to deal with bytes.
This commit is contained in:
parent
998171f0d7
commit
ad8c5ca4e7
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue