~mdw
/
distorted-chroot
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afb5d05
)
bin/chroot-maint (mkdir_p): Create absolute paths correctly.
author
Mark Wooding
<mdw@distorted.org.uk>
Fri, 20 Sep 2019 10:01:14 +0000
(11:01 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 20 Sep 2019 10:01:14 +0000
(11:01 +0100)
bin/chroot-maint
patch
|
blob
|
blame
|
history
diff --git
a/bin/chroot-maint
b/bin/chroot-maint
index
5b63037
..
a24d173
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