summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/os.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/os.py b/Lib/os.py
index 128351e..8cec912 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -152,6 +152,8 @@ def makedirs(name, mode=0777):
head, tail = path.split(head)
if head and tail and not path.exists(head):
makedirs(head, mode)
+ if tail == curdir: # xxx/newdir/. exists if xxx/newdir exists
+ return
mkdir(name, mode)
def removedirs(name):