summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2003-12-23 16:33:28 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2003-12-23 16:33:28 (GMT)
commit6fccc8a9ec17a97c51875bcde532d3b8e5ebaedd (patch)
tree4238af3fb2c9e3731c801e3b680ab96a005c9fea
parent7fc4cf57b8f75784e269e64403a1ea2b08bd512b (diff)
downloadcpython-6fccc8a9ec17a97c51875bcde532d3b8e5ebaedd.zip
cpython-6fccc8a9ec17a97c51875bcde532d3b8e5ebaedd.tar.gz
cpython-6fccc8a9ec17a97c51875bcde532d3b8e5ebaedd.tar.bz2
[Bug #829532] Invoking os.makedirs() with an argument that contains a
directory name with a single dot fails. The patch skips creating directories named os.curdir. (Patch by Bram Moolenaar) 2.3 bugfix candidate.
-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):