Commit f6fb3a32 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #15845: Fix comparison between bytes and string.

parents a2ad5c3a 4ab23bfb
......@@ -260,7 +260,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)
......
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