diff options
Diffstat (limited to 'Lib/os.py')
-rw-r--r-- | Lib/os.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) |