summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-03-04 17:11:20 +1100
committerAndrew Tridgell <tridge@samba.org>2011-03-15 12:22:20 +1100
commit20ec0b6629a35e40f97265b0fe6fdee4df274951 (patch)
tree25ffec40e4b552cb1ecf419aa0febfb32087e9c9 /buildtools/wafsamba
parent72ca88d6047e3dcce53c720db866171fb9963914 (diff)
downloadsamba-20ec0b6629a35e40f97265b0fe6fdee4df274951.tar.gz
samba-20ec0b6629a35e40f97265b0fe6fdee4df274951.tar.bz2
samba-20ec0b6629a35e40f97265b0fe6fdee4df274951.zip
waf: make mkdir_p() a bit more robust
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_utils.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index 54ceba9103..bffe98dcd8 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -308,7 +308,12 @@ def recursive_dirlist(dir, relbase, pattern=None):
def mkdir_p(dir):
'''like mkdir -p'''
- if not dir or os.path.isdir(dir):
+ if not dir:
+ return
+ if dir.endswith("/"):
+ mkdir_p(dir[:-1])
+ return
+ if os.path.isdir(dir):
return
mkdir_p(os.path.dirname(dir))
os.mkdir(dir)