diff mercurial/util.py @ 13053:2649be11ab0b stable

util: do not recurse in makedirs if name is '' (issue2528)
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Tue, 30 Nov 2010 17:48:12 +0900
parents dd24f3e7ca9e
children e2b8c7a6ff4d e1002cf9fe54
line wrap: on
line diff
--- a/mercurial/util.py	Mon Nov 29 20:13:11 2010 +0100
+++ b/mercurial/util.py	Tue Nov 30 17:48:12 2010 +0900
@@ -841,7 +841,7 @@
     except OSError, err:
         if err.errno == errno.EEXIST:
             return
-        if err.errno != errno.ENOENT:
+        if not name or err.errno != errno.ENOENT:
             raise
     parent = os.path.abspath(os.path.dirname(name))
     makedirs(parent, mode)