]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix bug discovered by Klaus-Juergen Wolf -- it runs into infinite recursion!
authorGuido van Rossum <guido@python.org>
Wed, 9 Jun 1999 19:07:22 +0000 (19:07 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 9 Jun 1999 19:07:22 +0000 (19:07 +0000)
Demo/scripts/makedir.py

index 58efe0e0fb8aa240e469a1106218f2aa48961473..4c00d8880962f250f8f75d03d75666e3a61761ce 100755 (executable)
@@ -12,7 +12,7 @@ def main():
                makedirs(p)
 
 def makedirs(p):
-       if not os.path.isdir(p):
+       if p and not os.path.isdir(p):
                head, tail = os.path.split(p)
                makedirs(head)
                os.mkdir(p, 0777)