sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 6e30efb9bb3b42bb27270f8ab2e2fc545fccb3c5
parent 9c037366967c80bf59d64e88113199446e3f871a
Author: sin <sin@2f30.org>
Date:   Mon, 20 Apr 2015 17:39:50 +0100

Fix mkdir -p with a leading /

Diffstat:
Mconfig.mk | 2+-
Mmkdir.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/config.mk b/config.mk @@ -13,4 +13,4 @@ RANLIB = ranlib # For NetBSD add -D_NETBSD_SOURCE CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 CFLAGS = -std=c99 -Wall -pedantic -LDFLAGS = -s -lrt +LDFLAGS = -s diff --git a/mkdir.c b/mkdir.c @@ -11,7 +11,7 @@ mkdirp(char *path) { char *p; - for (p = path; *p; p++) { + for (p = path + (*path == '/'); *p; p++) { if (*p != '/') continue; *p = '\0';