From: Andrew M. Kuchling Date: Tue, 23 Dec 2003 16:33:28 +0000 (+0000) Subject: [Bug #829532] Invoking os.makedirs() with an argument that contains a X-Git-Tag: v2.4a1~1055 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6fccc8a9ec17a97c51875bcde532d3b8e5ebaedd;p=thirdparty%2FPython%2Fcpython.git [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. --- diff --git a/Lib/os.py b/Lib/os.py index 128351e290e3..8cec9125ad77 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):