Issue #15845: Fix comparison between bytes and string.
diff --git a/Lib/os.py b/Lib/os.py
index d1101a2..81e037a 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -146,7 +146,10 @@
             # 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)