summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lumsden <lum@cvs.openbsd.org>2014-03-31 18:00:59 +0000
committerMark Lumsden <lum@cvs.openbsd.org>2014-03-31 18:00:59 +0000
commitb5b00b75ecd4287a0f09230ce7e81c1e019f23ec (patch)
treedc9cc81d17f52c837513e8d850915058bead9c9a
parent88cbf99a0b9a91663e6669b9cb54c66acacd413c (diff)
Allow more than one level of directories to be create via
make-directory again. ok florian@ jasper@
-rw-r--r--usr.bin/mg/dir.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/mg/dir.c b/usr.bin/mg/dir.c
index ab4b4128fea..b48888a8291 100644
--- a/usr.bin/mg/dir.c
+++ b/usr.bin/mg/dir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dir.c,v 1.25 2014/03/20 07:47:29 lum Exp $ */
+/* $OpenBSD: dir.c,v 1.26 2014/03/31 18:00:58 lum Exp $ */
/* This file is in the public domain. */
@@ -113,6 +113,8 @@ do_makedir(void)
while (--slash > path && *slash == '/')
*slash = '\0';
+ slash = path;
+
oumask = umask(0);
mode = 0777 & ~oumask;
dir_mode = mode | S_IWUSR | S_IXUSR;