mirror of
https://github.com/python/cpython.git
synced 2025-08-29 13:15:11 +00:00
Issue #15845: Fix comparison between bytes and string.
This commit is contained in:
parent
e50f4d2220
commit
4ab23bfbeb
1 changed files with 4 additions and 1 deletions
|
@ -146,7 +146,10 @@ def makedirs(name, mode=0o777, exist_ok=False):
|
|||
# be happy if someone already created the path
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
if tail == curdir: # xxx/newdir/. exists if xxx/newdir exists
|
||||
cdir = curdir
|
||||
if isinstance(tail, bytes):
|
||||
cdir = bytes(curdir, 'ASCII')
|
||||
if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists
|
||||
return
|
||||
try:
|
||||
mkdir(name, mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue