chiark
/
gitweb
/
~mdw
/
distorted-chroot
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bin/chroot-maint (mkdir_p): Create absolute paths correctly.
[distorted-chroot]
/
bin
/
chroot-maint
diff --git
a/bin/chroot-maint
b/bin/chroot-maint
index 5b63037998a537a96ce2af6d36de646bbe59d371..a24d17356f5c628a99b3e8ab5184f6666e1cff7a 100755
(executable)
--- a/
bin/chroot-maint
+++ b/
bin/chroot-maint
@@
-618,7
+618,8
@@
def mkdir_p(dir, mode = 0777):
Unlike `OS.makedirs', this doesn't fail if DIR already exists.
"""
- d = ""
+ if dir.startswith("/"): d = "/"; dir = dir[1:]
+ else: d = ""
for p in dir.split("/"):
d = OS.path.join(d, p)
if d == "": continue